Functional programming patterns tutorial in Scala, integrated with a Specs2 test suite