1
0
dust/examples/fibonacci.ds

12 lines
182 B
Plaintext
Raw Normal View History

2023-10-05 19:27:08 +00:00
fibonacci = function <number> {
if number <= 0 then 0
else if number == 1 then 1
else
first = fibonacci { number - 2 }
second = fibonacci { number - 1 }
first + second
}