Last active
April 1, 2018 01:21
-
-
Save wbbradley/81f884314b2e7738eceeb5c34a873701 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
module _ | |
# test: pass | |
# expect: pass with 5 | |
# expect: pass with 6 | |
def main() | |
x := 5 | |
foo := def (y int) | |
print("pass with " + (x + y)) | |
foo(0) | |
foo(1) |
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
$ zion run closure-example.zion | |
pass with 5 | |
pass with 6 | |
$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment