A Lua implementation of "Hello, declarative world" by Tom Stuart.
Hello, declarative moon
This is my little repo trying to following along with "Hello, declarative world" by Tom Stuart. Everything is written using LuaJIT.
I took some creative liberties add used metatables to make working with goals look prettier:
local goal = Goal.with_variables {"x", "y", "z"} (function(x, y, z)
return Goal.equal(x, 1) / Goal.equal(x, 2) / Goal.equal(x, 3)
+ Goal.equal(y, 1) / Goal.equal(y, 2) / Goal.equal(y, 3)
+ Goal.equal(z, 1) / Goal.equal(z, 2) / Goal.equal(z, 3)
end)