Added Haskell implemetation.

Tested it and confirm it's functional.