Files
flux/examples/fibonacci.flx
Jooris Hadeler 73e36fac71 Initial Flux language specification
Add the LL(1) context-free grammar (GRAMMAR.ebnf), token and syntax
reference (SYNTAX.md), LL(1) verification tool (ll1_check.py), and a
fibonacci example demonstrating the language.
2026-03-10 14:41:54 +01:00

7 lines
118 B
Plaintext

fn fibonacci(n: u8) -> u64 {
if n < 2 {
return n;
}
return fibonacci(n - 1) + fibonacci(n - 2);
}