add tailrec annotation to Exercise 3.24 solution

yup, it is in fact tail recursive