Exercise 3.6, tail recursive version