Solutions to ProjectEuler in Haskell and Scala