Created
September 27, 2010 15:40
-
-
Save jeremyBanks/599227 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
=== (Alleged) ORIGINAL CODE === | |
d = (: d_0 = 0; t = 0; v = 0 | |
: d_0 + t * v)() | |
`print` d(t=3, v=3, d_0=1) | |
`print` d(t=1, v=2) | |
`print` d(d_0=4) | |
=== TRANSLATED CODE === | |
#/usr/bin/env python3.1 | |
import jbpy | |
NS = {} | |
def JBPy_2(NS): | |
NS.set("_", (NS['d_0'] + (NS['t'] * NS['v']))) | |
return NS | |
def JBPy_1(NS): | |
NS.set("_", NS.set('d_0', 0)) | |
NS.set("_", NS.set('t', 0)) | |
NS.set("_", NS.set('v', 0)) | |
NS.set("_", jbpy.Block(JBPy_2, NS)) | |
return NS | |
def JBPy_0(NS): | |
NS.set("_", NS.set('d', jbpy.Block(JBPy_1, NS)())) | |
NS.set("_", print(NS['d'](t=3, v=3, d_0=1))) | |
NS.set("_", print(NS['d'](t=1, v=2))) | |
NS.set("_", print(NS['d'](d_0=4))) | |
return NS | |
jbpy.Block(JBPy_0, NS)() | |
=== EVALUATION === | |
10 | |
2 | |
4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment