Added JavaScript implementation>
Added Haskell implementation.