Created
June 17, 2014 13:40
-
-
Save 0x00b1/21ad11b726cc9d1ae093 to your computer and use it in GitHub Desktop.
! (goto)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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