lean2/tests/lua/replace1.lua

11 lines
274 B
Lua
Raw Normal View History

local f = Const("f")
local a = Const("a")
local b = Const("b")
local t = f(a, f(a))
local new_t = t:replace(function(e)
if e == a then
return b
end
end)
print(new_t)