Solved 7 with Haskell.