Added answer to problem 10 by haskell