Demo entry 6745118

Implementation of Fibonacci using multi

   

Submitted by anonymous on May 26, 2018 at 01:13
Language: Perl6. Code size: 126 Bytes.

# Implementation of Fibonacci using multi

multi fib(0) { 1 }
multi fib(1) { fib(0) }
multi fib(Int $n) { $n * fib($n-1) }

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).