Add fibonacci to funcdefs.nct

This commit is contained in:
Mid 2025-01-02 18:07:55 +02:00
parent 6968777385
commit ff962b6361

View File

@ -1,7 +1,6 @@
/* Currently return isn't implemented (and no ret instructions are output either) */
/* Oh and arguments aren't supported yet either */
/* But functions work :) */
foo: u0() {
return 15;
fibonacci: u32(u32 n) -> {
if(n <= 1) {
return n;
}
return fibonacci(n - 1) + fibonacci(n - 2);
};