Starting functional implementation of code kata with Scala