Skip to content

Instantly share code, notes, and snippets.

@doublec
Created May 5, 2016 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doublec/61f80997f784039e17174023a5022865 to your computer and use it in GitHub Desktop.
Save doublec/61f80997f784039e17174023a5022865 to your computer and use it in GitHub Desktop.
Calling a lambda functoin recursively in Pony
actor Main
new create(env:Env) =>
let fac = lambda (n:U32): U32 => if n == 0 then 1 else n * this(n - 1) end end
env.out.print("fac 5 = " + fac(5).string())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment