Are parameters replaced with their respective arguments before function execution even if they havent been evaluated (I.E. irrespective of whether lazy or eager evaluation is used),true in all cases.
I want to understand whether we can generalise the statement:
Before a function is executed (irrespective of argument evaluation), the parameters are "assigned" to the arguments in the function call.
e.g. f(x,y)
x +=1
y +=1
return x+y;
I call f(1,2):
- 1 and 2 is assigned to x and y
- then the rest is executed
I call f(2*3,5*6):
- In eager evaluation 6 and 30 is assigned
- In lazy evaluation
2*3and5*6is assigned?
Please could you clarify, thank you!