Lint.fold: def of bend-lint-api@0.2.0.0 Import: import bend-lint-api@0.2.0.0/linter/lint.bend as Lint Lines 344-364 of bend-lint-api@0.2.0.0/linter/lint.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&start_line=344&end_line=364 import Base # `f(c, node, s)` for each node of `nodes` and under them, parents first, in order, from `s`. def fold( ~C: Data, ~S: Data, ~f: @+c: C -> @+node: Node -> S -> S, +c: C, nodes: List<&2, Node>, s: S ) -> S: match nodes: case Nil{}: s case Con{Node{syntax, name, span, +kids, facts}, rest}: fold( ~C, ~S, ~f, c, rest, fold(~C, ~S, ~f, c, kids, f(c, Node{syntax, name, span, kids, facts}, s)) ) Uses (2): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Node