reid-llvm/medium.reid

12 lines
206 B
Plaintext
Raw Normal View History

2023-07-27 16:40:12 +02:00
// if-statements, functions
import std::print;
fn fibonacci(value: i32) -> i32 {
if value < 3 {
return 1;
}
return fibonacci(value - 1) + fibonacci(value - 2);
}
print(fibonacci(15));