Examples in programming in scala book