Some haskell solutions