Artifact e1c8ef128b36e0e2a630960b85bdde79182c00ea:
- File tests/langbench/fib.pl — part of check-in [69b737f5a1] at 2016-04-19 20:35:49 on branch little — Fork of Tcl used in the "Little" project. http://www.mcvoy.com/lm/little/index.html (user: dgp, size: 161) [annotate] [blame] [check-ins using]
sub fib { my($n) = @_[0]; return $n if $n < 2; return &fib($n - 1) + &fib($n - 2); } for ($i = 0; $i <= 30; ++$i) { printf "n=%d => %d\n", $i, &fib($i); }