Es: A shell with higher-order functions (1993)
While rc was an experiment in adding modern syntax to Bourne shell semantics, es is an exploration of new semantics combined with rc-influenced syntax: es has lexically scoped variables, first-class functions, and an exception mechanism, which are concepts borrowed from modern programming languages such as Scheme and ML. Exceptions are trapped with the built-in , which typically takes the form
The value of this rewriting is that the function (and that of just about any other shell service) can be spoofed, that is, overridden by the user: when a new function is defined, the default action of redirection is overridden. [Errata note 6]
Much of the script consists of lines like:
There are also a set of assignments which bind the built-in shell functions to their hook variables:
Finally, some settor functions are defined to work around UNIX path searching (and other) conventions.
Source: wryun.github.io