exercises from http://aperiodic.net/phil/scala/s-99/ (scala coding dojo)