Scala day3 exercises.