Skip to content

Instantly share code, notes, and snippets.

@0x00b1
Created June 17, 2014 13:40
Show Gist options
  • Save 0x00b1/21ad11b726cc9d1ae093 to your computer and use it in GitHub Desktop.
Save 0x00b1/21ad11b726cc9d1ae093 to your computer and use it in GitHub Desktop.
! (goto)
[1] (operator { postfix: ! } ({ a: Z64 } → Z64)
({ accumulator: Z64 } ← 1)
{ compute:
(match [a]
{ 0: accumulator }
{ _: (accumulator ← (a × accumulator))
(a ← (a − 1))
(goto compute)})})
{ operator: { postfix: :! } ({ a: Z64 } → Z64) }
[2] 5!
120
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment