examples from book scala in action