Solving http://www.pythonchallenge.com in Haskell