Imperative Programming HT23, Scala