What is “pass-by-name” and how does it work exactly?

I found a good explanation at Pass-By-Name Parameter Passing. Essentially, the body of a function is interpreted at call time after textually substituting the actual parameters into the function body. In this sense the evaluation method is similar to that of C preprocessor macros. By substituting the actual parameters into the function body, the function … Read more