Added Haskell implemetation.

Tested it and confirm it's functional.
Merge pull request #97 from jurov/patch-1

Added Haskell implementation.