Skip to content

Instantly share code, notes, and snippets.

@inducer
Created March 7, 2014 04:22
Show Gist options
  • Save inducer/9405205 to your computer and use it in GitHub Desktop.
Save inducer/9405205 to your computer and use it in GitHub Desktop.
Closures demo
def fake_newton(f):
print f(17)
def main():
target_value = 18
def f(x):
return x - target_value
fake_newton(f)
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment