Solve problems 26,30 using Haskell.