Scala cookbook ch1