Scala Homework