Useful Idioms that will blow your mind (unless you already know them :)

This collection is supposed to be comprised of short, useful, cool, magical examples, which should incite the reader's curiosity and (hopefully) lead him to a deeper understanding of advanced Haskell concepts. At a later time I might add explanations to the more obscure solutions. I've also started providing several alternatives to give more insight into the interrelations of solutions.

Monad Magic

-- all combinations of a list of lists.
-- these solutions are all pretty much equivalent in that they run in the List Monad. the "sequence" solution has the advantage of scaling to N sublists.
-- "12" -> "45" -> ["14", "15", "24", "25"]
sequence ["12", "45"]