Transcong.walk: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/style/transcong.bend as Transcong Lines 151-164 of bolt@1.27.0.0/src/rules/style/transcong.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/style/transcong.bend&start_line=151&end_line=164 import Base import bolt@1.27.0.0/src/finding.bend as F import bolt@1.27.0.0/src/syntax/tree.bend as Tree # every site under the node, at any depth; top: the node is not among a # let's own nodes, nor after a `=` or `<-` leaf in its chain def walk(nn: Tree.Node, +top: Bool, +path: String) -> List<&2, F.Finding>: match nn: case Tree.NCons{+h, +rest}: +here = site(h, rest, path) List.concat(&2, F.Finding, [Bool.pick(List<&2, F.Finding>, top, here, []), walk(h, True{}, path), walk(rest, Bool.and(top, Bool.not(binds(h))), path)]) case Tree.Group{_o, kids, _cl}: walk(kids, True{}, path) case Tree.Stmt{sk, kids, body}: List.concat(&2, F.Finding, [walk(kids, Bool.not(is_let(sk)), path), walk(body, True{}, path)]) case _other: Nil{} Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.concat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/finding.bend&name=Finding https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/style/transcong.bend&name=binds https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/style/transcong.bend&name=is_let https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/style/transcong.bend&name=site https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/tree.bend&name=Node