Solutions to Scala 99 exercises