Thanks a bunch for the vid. It was really well explained with the examples!
Thank you, Nicely explained.
Very cool outro video, love it too.
Well explained. Thank you!
Helped me out with returning HOF, btw your voice sounds like an almost perfect text to speech robot 🤣
Simple nice introduction.
excellent free knowledge
Hello fellow coders I new and this was a very VIDEO helpful. oops returned Loud
superb explanation. Thnx bro
thank you so much!
Why on the first example the function is called with the () and how can we differentiate from a variable (as it could be mistaken by an variable)
Thank you!
very useful, thanks
Great stuff, very good tutorial.
NEED ASSISTANCE ASAP, FOR THE SECOND ONE....
how does divide(10) take the value to dividend(y)
heya, i had this issue too, after thinking for abit, I think i got it, let me try to explain:
after the line divide = divisor (2), x becomes 2 and it goes through the code, returning divident.
so now the next line, divide(10) can be read as divident(10) because it returned divident, thus y=10, hope it helps!
Good stuff.
thx 4 vid bro !
Thanks! I was srtuck on this
Really useful
Good video
Wow!
Good video bro
Thanks!
Good content
yo the second example caught me off guard
Thank You Sir
i don't really understand the second example
he used function assigned to variable..the divisor(x=2) function returns dividend function.
and then he assigned this result to divide variable. now the dive variable is acting as the dividend function with argument of 10.hope i sound clear
Thank you
Niceee man
Thank you bro
Bro, please add English subtitles, because it's only Vietnam. Lol
Thank you!
You are the best
Splendid, spend hrs with gpt bbut didnt get it, here 5 mins. I like this crazy function itself traveling hiding behind innocent variable name. Will make code looks simple but cant be copy pasted
Thanks
thanks bro
I would always be grateful. For the last two days I had been stuck with decorators in python. You answered my question. 🌹 Thanks again.
1) Liked
2) Commented
3) Subscribed
I cannot wrap my head around the first one. The second one makes more sense if you write it like this:
print(divisor(2)(10))
wow thanks bro. I tried so hard to understand the logical of the 2nd one. but when I see your tips, it helps me a lot
Does anyone has best playlist to learn react js
kinda mind boggling
print(divisor(2)(10))
Here is my random comment for your BRO ❤
Man, I thought it called closure, is not it? (the seconds examp)
love u
Trippy stuff, but interesting
I don't get the efficacy of this in the context of making code readable, Making less code maybe.
drop a comment
higher order comment :P
random comment ;)
Sreen is not clear
Thanks!
Thank you
Thanks
Thanks Bro
# Higher Order Function = a function that either:
# 1. accepts a function as an argument
# or
# 2. returns a function
# (In python, functions are also treated as objects)
# ----- 1. accepts a function as an argument -----
def loud(text):
return text.upper()
def quiet(text):
return text.lower()
def hello(func):
text = func("Hello")
print(text)
hello(loud)
hello(quiet)
# ------------ 2. returns a function -------------
#def divisor(x):
#def dividend(y):
#return y / x
#return dividend
#divide = divisor(2)
#print(divide(10))
why diivde(10) and not dividend(10)