Optimising Perl 6
sub fib-optimised-v5($n) { if $n > 1 { fib-optimised-v5($n - 1) + fib-optimised-v5($n - 2); } else { $n; } }