Scala exercises