Project Euler on Scala - Functional Style!