Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. actor Main
  2. new create(env: Env) =>
  3. let factorial =
  4. object val
  5. fun apply(x: U32): U32 =>
  6. if x == 0 then 1 else x * apply(x - 1) end
  7. end
  8. env.out.print(factorial(7).string())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement