Haskell version added (first approach)