Skip to content

Instantly share code, notes, and snippets.

@christineponyl
Created October 18, 2019 13:26
Show Gist options
  • Save christineponyl/cdd124fc3385f56d3326f0947eccd99a to your computer and use it in GitHub Desktop.
Save christineponyl/cdd124fc3385f56d3326f0947eccd99a to your computer and use it in GitHub Desktop.
actor Main
let _out: Outstream
new create(env: Env) =>
_out = env.out
_out.print(fib(5).string())
fun fib(n: U64): U64 =>
match n
| 0 => 0
| 1 => 1
else
let n1 = n - 1
let n2 = n - 2
_out.print(n.string()) // -I need to print right here
fib(n - 1) + fib(n - 2)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment