Add sample to show how to use tail recursion and @tailrec annotation.