Warning: this is an htmlized version! The original is across this link, and the conversion rules are here.
```-- This file: (find-angg "LUA/lowerdiag.lua")
--    http://angg.twu.net/LUA/lowerdiag.lua.html
--
-- Sample output:
-- 1
-- >=2
-- >=+-3
-- >=>=+-4
--   >=>=+-6
--   >=+->=+-8
--   >=+-+-+-+-10
--   >=>=>=>=+-+-12
--   >=+-+-+-+-+---14
--   >=+->=+->=+---+-16
--   >=>=+->=--+---+---18
--   >=+->=---->=--+---+-20
--     >=------+---+--->=+-9
--     >=------+---+-----+---15
--             >=--+----->=-->=5
--                 >=------------7

matrix = {}
nodes = {}
PPT  = function (T) print(mytostring_table(T, ",\n ")) end
PPMM = function () PPT(matrix) end
PPM  = function () print(table.concat(map(table.concat, matrix), "\n")) end
local n = #matrix
local line = {[n + 1] = name}
for i=1,n do line[i] = "  " end
matrix[n + 1] = line
end
while #matrix < n do addlinetomatrix("") end
matrix[n][n] = name
end
if not nodes[str] then
-- table.insert(nodes, str)
-- nodes[str] = #nodes
nodes[str] = #matrix
end
return nodes[str]
end
addh = { ["  "] = "--", ["| "] = "+-" }
addv = { ["  "] = "| ", ["--"] = "+-" }
matrix[y][x] = str
for xx=x+1,y-1 do matrix[y][xx] = addh[matrix[y][xx]] or matrix[y][xx] end
for yy=x+1,y-1 do matrix[yy][x] = addv[matrix[yy][x]] or matrix[yy][x] end
end
end

tolast = function (str)
spl = split(str)
end
tofirst = function (str)
spl = split(str)
end

--[[
-- Demo/test:

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/lowerdiag.lua"
matrix = {}
nodes = {}
-- tofirst "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20"
-- addnodes "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20"
tofirst "1 2 3 4"
tofirst "2 4 6 8 10 12 14 16 18 20"
tofirst "3 6 9 12 15 18"
tofirst "4 8 12 16 20"
tofirst "5 10 15 20"
tofirst "6 12 18"
tofirst "7 14"
tofirst "8 16"
tofirst "9 18"
tofirst "10 20"
PPMM()
PPM()
PP(nodes)

--]]

-- Local Variables:
-- coding:               raw-text-unix
-- ee-anchor-format:     "«%s»"
-- End:
```