Just some Scala problems (practice