Write scheme using haskell