Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. :: open a gate that takes an unsigned decimal and give it a face, n
  2. ::
  3. |= n=@ud
  4. :: let t be an unsigned decimal with an initial value of 1
  5. ::
  6. =/ t=@ud 1
  7. :: return to this point of recursion if the following condition is not met
  8. ::
  9. |-
  10. :: if n is 1, return t. Otherwise, continue to the next line
  11. ::
  12. ?: =(n 1)
  13. t
  14. :: decrease n by 1, multiply t by n, and return the new values of n and t to the point of recursion
  15. ::
  16. $(n (dec n), t (mul t n))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement