While closures are almost always created via anonymous subroutines
(a lasub { ... }) at the lowest level, the real
fun only comes about when you delegate this chore to some kind helper
function that builds anonymous subroutines for you. Thus, in heavily
functional code, you usually don't use sub { } yourself
but instead rely upon a library of helpers to do the grunt work for
you.

For example, here's a function that builds functions to append
a given suffix to strings:

We can have even more fun if we create higher-order functions that
remember other functions in their closures. Here's a pair of
functions that can be used to apply other functions to a list of
arguments as a whole or to each argument, one at a time:

Note that when building pipelines using compose, the input
data flows through the functions right-to-left (following mathematical
convention). Watch what happens
if we parenify first and then match for words:

As a final example, let's build 27 different pipeline combinations
from our earlier collection of functions and see what each pipeline
does when applied to a reference string. To help us out, let's first
build id – the identity function – which
simply returns its input as its output. We'll use it to pass
data through stages of our pipeline unchanged.