Project Euler - learning Scala