2013-12-27 03:49:04 +00:00
|
|
|
import("util.lua")
|
2013-11-08 20:09:46 +00:00
|
|
|
f = Const("f")
|
|
|
|
x = Const("x")
|
|
|
|
y = Const("y")
|
|
|
|
a = Const("a")
|
|
|
|
b = Const("b")
|
|
|
|
print(Let(x, f(a), f(x, x)))
|
|
|
|
print(Let({{x, f(a)}, {y, f(b)}}, f(x, y)))
|
|
|
|
x1, x2, x3 = Consts("x1, x2, x3")
|
|
|
|
assert(tostring(f(x1, x2, x3)) == "f x1 x2 x3")
|
|
|
|
y1, y2 = Consts("y1 y2")
|
|
|
|
assert(tostring(f(y1, y2)) == "f y1 y2")
|