13 lines
150 B
Plaintext
Raw Normal View History

2024-07-30 14:36:33 +00:00
import log
2024-07-18 16:08:30 +00:00
2024-07-09 08:28:14 +00:00
main() {
2024-07-30 14:36:33 +00:00
log.number(fibonacci(10))
2024-07-09 08:28:14 +00:00
}
2024-08-05 16:47:24 +00:00
fibonacci(x Int) -> Int {
2024-07-11 09:53:49 +00:00
if x <= 1 {
2024-07-09 08:28:14 +00:00
return x
}
return fibonacci(x - 1) + fibonacci(x - 2)
}