started problem 17 - need applicative in Scala (maybe)