Skip to content

Instantly share code, notes, and snippets.

@masak
Created March 31, 2010 11:25
Show Gist options
  • Save masak/350204 to your computer and use it in GitHub Desktop.
Save masak/350204 to your computer and use it in GitHub Desktop.
# 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