Browse Source

Fix fib example

github-actions
Garrit Franke 2 years ago
parent
commit
76f407fc3f
  1. 7
      examples/fib.sb

7
examples/fib.sb

@ -1,12 +1,11 @@
main :: () {
fn main() {
let num = 10
return fib(num)
}
fib :: (n) {
if n <= 1 {
fn fib(n) {
if 1 >= n {
return n
}
return fib(n-1) + fib(n-2)
}
Loading…
Cancel
Save