A powerful feature of Haskell (as with all functional programming) is that functions are
first class. What the first class status of functions means is that functions are themselves
simply values. Just as you might pass an integer as an argument to a function, in Haskell
you can pass another function to a function. To a limited extent, you can do the same
with function pointers in a language like C, but Haskell is far more versatile.
The power of Haskell's first class functions lies largely in Haskell's type checking
system. In C, one might write a "quicksort" function that accepted a function pointer as
an argument, much as in the Haskell example. However, in C you would have no easy
way to make sure that the function (pointed to) had the correct type signature. That is,
whatever function serves as an argument to qsortF must take two arguments of the
same type ("a" stands for a generic type) and produce a Bool result. Naturally, the list
passed as the second argument to qsortF must also be of the same type "a." Notice
also that the type signature given in the sample code is only needed for documentation
purposes. If the signature is left out, Haskell infers all these type constraints
automatically. tailComp meets the right type signature, with the type String being a
specialization of the generic type allowed in qsortF arguments (a different comparison
function might operate over a different type or type class).