-A by-value parameter is like receiving a val field, its body is evaluated once, when the parameter is bound to the function.
-A by-name parameter is like receiving a def method;its body is evaluated whenever it is used inside the functions.
This (by-name) indicates that the arguments is not evaluated at the point of function application, but instead are evaluated at each use within the function.
Top comments (0)