Solution to Scala 99 problems from http://aperiodic.net/phil/scala/s-99/