Scala exercises for day 2.