Haskell attempt.