Skip to content

Instantly share code, notes, and snippets.

@wbbradley
Last active April 1, 2018 01:21
Show Gist options
  • Save wbbradley/81f884314b2e7738eceeb5c34a873701 to your computer and use it in GitHub Desktop.
Save wbbradley/81f884314b2e7738eceeb5c34a873701 to your computer and use it in GitHub Desktop.
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)
$ 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