Otherwise, look for it among the formal parameters of the next outermost enclosing lambda expression, and so on. Otherwise, it must be a global variable. They make it easy to figure out which declaration corresponds to each use, just by looking at the program text. Primop names behave as S-expression literals. User-defined functions are always introduced by lambda expressions.
Folds Consider the following problems.
So it's not bad style to define all functions as curried. Equivalently, we could insist that every function take exactly one argument. Of course, the primops are built-in as binary functions. To handle these, we can write a function to convert any fixed-arity function to its curried equivalent. Evaluate e1 to a value in environment , obtaining v .