Skip to content

Instantly share code, notes, and snippets.

@seungjin
Created May 7, 2009 22:36
Show Gist options
  • Save seungjin/108441 to your computer and use it in GitHub Desktop.
Save seungjin/108441 to your computer and use it in GitHub Desktop.
// get rid of for/while in your python
#!/usr/bin/env python
# get rid of for/while in your python code!
def loop(givenF,a,b):
if ( a >= 0 and b >= a) :
givenF()
a += 1
loop(givenF,a,b)
def sayHello():
print("say hello")
loop(sayHello,1,4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment