a guest Mar 20th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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())
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand