haskell: add solution for problem 1

Never solved it in haskell :)