Created
March 31, 2010 11:25
-
-
Save masak/350204 to your computer and use it in GitHub Desktop.
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
# The below is a SIC representation of 'if 42 -> $a { say $a }'. It is an example | |
# of how different blocks and binding might look in SIC. | |
block 'main-block' { | |
$0 = 42 | |
# should we have a boolification step? | |
jnt $0, l0 | |
$1 = get-block 'anon-then-1' | |
$2 = make-capture | |
store $2[0], $0 | |
call $1, $2 | |
l0: | |
} | |
block 'anon-then-1' in 'main-block' (1) { | |
$0 = param 0 | |
$1 = fetch '&say' | |
$2 = make-capture | |
store $2[0], $0 | |
call $1, $2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment