P2, P3, P4, P8, P10, P12: Added Haskell solution.