Haskell code snippets