Solutions to Project Euler problems in Scala and Haskell