In MATLAB it is possible to create function handles with something like
myfun=@(arglist)body
This way you can create functions on the go withou
This is not quite the full answer. In matlab, one can make a file called funct.m:
function funct(a,b)
disp(a*b)
end
At the command line:
>> funct(2,3)
6
Then, one can create a function handle such as:
>> myfunct = @(b)funct(10,b))
Then one can do:
>> myfunct(3)
30
A full answer would tell how to do this in python.
Here is how to do it:
def funct(a,b):
print(a*b)
Then:
myfunct = lambda b: funct(10,b)
Finally:
>>> myfunct(3)
30