Ruby tail recursion