lambda expression of main function's return value
-
26-10-2019 - |
Question
In specific case, like this
f(x) { return x+5; }
g(x, y) { return 2*x + y; }
main() { return f(g(1, 2)); }
what is the lambda expression of return value of function main?
Solution
In python:
lambda x, y: (2*x + y) + 5
returns 9 if called with 1, 2.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow