Scheme implementation in haskell (haskell tutorial)