Going one step further, can be handy to treat procedure values just like other values, e.g., to return them as function results or store them into variables. Involves taking copies of the values of non-local variables, so only works when values are immutable . Can always introduce extra level of indirection to achieve this. The distinctive flavor of functional languages derives from being able to return functions that are locally defined. For convenience, they also support anonymous function values, i.e., a function can be denoted without declaring a name for it.
Functional languages allow more sophisticated abstraction mechanisms.
Argument n is the value to return for the nil list. Argument f is the function to apply to each element and the previously computed result. Awkward or impossible to deal with these conditions explicitly without distorting normal code. In most languages, uncaught exceptions propagate to next dynamically enclosing handler. E.g, caller can handle uncaught exceptions raised in callee.