Artifact c7736fa58b7fe8aeb846a41de5e542c96b8b0d28:
- File tests/langbench/fib.tcl — 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: 261) [annotate] [blame] [check-ins using]
proc fib {n} { # Very bogus we have to do {$n - 1} to get performance. # But if we don't this takes 35 seconds. Tcl has issues. expr {$n < 2 ? 1 : [fib [expr {$n -2}]] + [fib [expr {$n -1}]]} } set i 0 while {$i <= 30} { puts "n=$i => [fib $i]" incr i }