wrote problem8 in haskell without do syntax