Add grade-school exercise in Scala