ex5.3 - tail recursive takeWhile()