i have a problem:
I need to implement a function in python which prints a skalar multiple of an argument - the argument is a function itself which has the signature:
def innerF(a,b):
return x
The skalar multiplier is a constant within the function - e.g.
return 55 * x
Now comes the part i dont seem to get: The call Sytanx is required to be:
print( outerF(innerF)(a,b))
So in summary
def innerF(a,b):
return a + b
def outerF( #What goes here? ):
return 55* #How two call the innerF?
print(outerF(innerF)(a,b))
What i know so far:
I can pass the innerF an the a,b as seperate arguments to outerF like
def outerF(innerF,a,b): return 53* innerF(a,b)
What i dont get:
The signature of the outerF call with innerF(outerF)(a,b) is completly unknow to me. Also i could not find refernce.
Thank you very much in advance!