Added another example to the scrapbook

Based on listing 11.8 of Function Programming in Scala