Created
November 2, 2012 15:10
-
-
Save joshmarlow/4001910 to your computer and use it in GitHub Desktop.
Random file for playing with ast
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
def f3(x): | |
return 3*x | |
def f4(x): | |
return 4*x | |
def f2a(x): | |
return 2*f3(x) | |
def f2b(x): | |
return 2*x + 1 + f4(x) | |
def f(x): | |
return f2a(x) + f2b(x) | |
x = 1 | |
for i in range(10): | |
new_x = f(x) | |
print "{0} -> {1}".format(x, new_x) | |
x = new_x | |
print "{0} -> {1}".format(x, new_x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment