Week 2 assignment for Func Scala course @ Coursera