3 ms·
Another power of Lisp is that it can accept functions as first-class arguments and produce functions as returned values. This means you can do obvious things l
by dreamcompiler 4y ago
Another power of Lisp is that it can accept functions as first-class arguments and produce functions as returned values.
This means you can do obvious things like sort an array given a comparison function, or produce a generator from a static array. But it also means you can convert one function into another kind of function. Functional analysis calls these operators. Differentiation is an operator, as is integration, as is the Fourier transform, as is function composition. Many such things don't even need macros, but macros can help.