Scala solution to Project Euler solutions for learning and code review