示例#1
0
    def before(x, y):
        e1 = env_setitem(newenv, embed(x), x)
        e1 = env_setitem(e1, embed(y), y)

        e2 = env_setitem(newenv, embed(y), y)
        e2 = env_setitem(e2, embed(x), x)

        return env_getitem(env_add(e1, e2), embed(x), 0)
示例#2
0
    def f(x, y):
        e1 = env_setitem(newenv, embed(x), 100)

        e2 = env_setitem(newenv, embed(x), 10)
        e2 = env_setitem(e2, embed(y), 20)

        e3 = env_add(e1, e2)

        a = env_getitem(e3, embed(x), 0)
        b = env_getitem(e3, embed(y), 0)
        c = env_getitem(e3, embed(a), 0)

        return (a, b, c)