Can you assign function arguments before they have been evaluated?

12 views Asked by At

I want to understand whether it is possible to assign the values of arguments passed to the function even if they havent been fully evaluated.

With Eager Evaluation I assume that its always the case that evaluation occurs before assign.

However with Lazy evaluation does the same still hold?

Otherwise what happens when the value of the argument is needed, how does it know what expression to evaluate.

e.g.

f(x,y):
    return x + y

#Assume Lazy evaluation
f(2,5+3)

What would occur in this case?
0

There are 0 answers