Exercises from Functional Programming in Scala solved using JDK 8