Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
-- Classes for ZDags. -- (find-angggrep "grep -niH -e dag LUA/*.lua") -- (find-angggrep "grep -niHl -e dag LUA/*.lua") -- (find-angg "LUA/canvas2.lua") -- (find-angg "LUA/canvas3.lua") -- (find-angg "LUA/canvas3a.lua") -- (find-angg "LUA/defwithmanyargs.lua") -- (find-angg "LUA/distributivity.lua") -- (find-angg "LUA/latexdags.lua") -- (find-dn5file "zdags.lua") -- (find-blogme4 "eoo.lua") -- (find-dn5 "eoo.lua") -- Class = { type = "Class", __call = function (class, o) return setmetatable(o, class) end, } setmetatable(Class, Class) otype = function (o) -- works like type, except on my "objects" local mt = getmetatable(o) return mt and mt.type or type(o) end over = function (uppertable) return function (lowertable) setmetatable(uppertable, {__index=lowertable}) return uppertable end end ClassOver = function (upperclassmt) return function (lowerclass) setmetatable(upperclassmt.__index, {__index=lowerclass.__index}) return Class(upperclassmt) end end HBox = Class { type = "HBox", __tostring = function () return "Hello" end, __index = { }, } -- LDags are "linearized DAGs": DAGs on a set {1,...,n}, with all -- arrows pointing to the right. LDag = Class { type = "LDag", __index = { }, } --[[ * (eepitch-lua51) * (eepitch-kill) * (eepitch-lua51) dofile "zdags.lua" --]] -- Local Variables: -- coding: raw-text-unix -- End: