1
1
mirror of https://github.com/tweag/nickel.git synced 2024-10-07 00:30:47 +03:00
nickel/examples/fibonacci
2021-04-28 18:37:11 +02:00
..
fibonacci.ncl Put each example in its own directory with a README 2021-04-28 18:37:11 +02:00
README.md Put each example in its own directory with a README 2021-04-28 18:37:11 +02:00

Fibonacci

This is a basic example of a recursive function: fibonnacci. This is the naive, exponential version of fibonacci: don't call it on a big value!

Currently, only record bindings are recursive. To use a recursive function, one has to use a record.

Run

$ nickel -f fibonacci.ncl