# Compute nth Fibonacci number sub fib { my $n = shift; if ($n < 2) { $n } else { fib($n-1) + fib($n-2) } }
Very slow
Too much recursion
Memoizing wins