Scala by Example - Exercise 6