haskell solution to five