Added Answer to Chapter 2 Exercise 3

Simple answer that does create valid Scala code. There might be other options, but this one works.