Haskell implementation