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?

Was it helpful?

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
scroll top