+ 1

May i know what is the parameter separated by comma in that definition. actually i'm confused whether it is the actual argument

def my_func(f, arg): return f(arg) my_func(lambda x: 2*x*x, 5)

11th Jul 2019, 7:01 PM
N Hrishikesh Prabhu
N Hrishikesh Prabhu - avatar
1 Réponse
+ 2
Hi. There are quite some cool features nested. The lamba as a definition in place. This given to a function that does nothing more than taking the reference to a function and filling in the argument to the call and returning the result (I am guessing 50?) Hope that helps. Cheers. C
11th Jul 2019, 8:50 PM
ChrA
ChrA - avatar