Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- actor Main
- new create(env: Env) =>
- let factorial =
- object val
- fun apply(x: U32): U32 =>
- if x == 0 then 1 else x * apply(x - 1) end
- end
- env.out.print(factorial(7).string())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement