- adding problem4 in haskell