Whilst starting to learn lisp, I\'ve come across the term tail-recursive. What does it mean exactly?
here is a Perl 5 version of the tailrecsum function mentioned earlier.
tailrecsum
sub tail_rec_sum($;$){ my( $x,$running_total ) = (@_,0); return $running_total unless $x; @_ = ($x-1,$running_total+$x); goto &tail_rec_sum; # throw away current stack frame }