Toml.tables: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/toml/toml.bend as Toml Lines 292-303 of ezx@1.11.0.0/src/toml/toml.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/toml/toml.bend&start_line=292&end_line=303 import Base import emerging-eztoml@0.9.0.0/main.bend as E # the sections of every table among a table's rows, in document order: each # table's own section, then the tables in it, then the tables after it. The # path to the table is kept innermost first, so a level prepends its name. def tables(rows: List<&2, E.Val>, +segs: List<&2, String>) -> List<&2, Sect>: match rows: case []: [] case E.VPair{name, E.VHead{_path, +sub}} <> tl: +at : List<&2, String> = name <> segs List.append(&2, Sect, table.sects(at, sub, tables(sub, at)), tables(tl, segs)) case _hd <> tl: tables(tl, segs) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=emerging-eztoml@0.9.0.0/main.bend&name=Val https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/toml/toml.bend&name=Sect https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/toml/toml.bend&name=table.sects