This is intended as a beginner's tutorial for learning Haskell from a
"Let's just solve things already!" point of view. The examples should
help give a flavor of the beauty and expressiveness of Haskell
programming.

1 How to run

These functions can be executed as one liners from a shell. For example,
to use the Haskell version of 'wc':

$ cat file.txt | ghc -e 'wc_l' UnixTools.hs

Or, one could define 'main' to be a chosen tool/function (add a line to
the effect that "main = wc_l") and then compile the tool with

$ ghc --make UnixTools.hs

The given Haskell codes presents yet a third way of doing things: much
like the BusyBox suite of Unix
tools, it is possible to compile a single monolithic binary and have it
detect what name it is run by and then act appropriately. This is the
approach the following code takes: you can compile it and then make
symbolic links (like "ln -s UnixTools echo; ln -s UnixTools cat"
) and then run those commands ("./echo foo | ./cat"
would produce output of "foo").