Code from 'Learn You a Haskell for Great Good'