a scheme implementation, in Haskell