Some simple things from Functional Programming in Scala