Created
June 19, 2012 02:00
-
-
Save mattbierner/2951898 to your computer and use it in GitHub Desktop.
Prosopon Factorial Example
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
let FactorialContinuation{val cust}< | |
case \arg: send val ('*' arg cust) ; | |
> | |
let Factorial < | |
case 0 \cust: send cust (1) ; | |
case \val \cust: | |
send val ('-' 1 < | |
case \result: | |
send Factorial (result FactorialContinuation{val cust}) | |
; | |
>) | |
; | |
> | |
send Factorial (9 stdout) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment