Skip to content

Instantly share code, notes, and snippets.

@kanerogers
Created October 25, 2012 10:55
Show Gist options
  • Save kanerogers/3951993 to your computer and use it in GitHub Desktop.
Save kanerogers/3951993 to your computer and use it in GitHub Desktop.
Fibbonaci sequence finder in Io
main := Object clone
main fb := method(num,
i := 1
last := 0
fib := 0
current := 0
i println
while(fib != num,
fib = fib + 1
current = i
i = i + last // 1 + 0
last = current
i println
)
return i
)
main fb(3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment