challenge 139 in Haskell