AppendInLoop.has: def of bend-lint-rules@0.2.0.0 Import: import bend-lint-rules@0.2.0.0/performance/append_in_loop.bend as AppendInLoop Lines 88-98 of bend-lint-rules@0.2.0.0/performance/append_in_loop.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-rules@0.2.0.0/performance/append_in_loop.bend&start_line=88&end_line=98 import Base import bend-lint-api@0.2.0.0/linter/lint.bend as Lint # Whether a variable the file writes, of the binder `b`, is among `nodes` or under them, or `found`. def has(nodes: List<&2, Lint.Node>, +b: U32, found: Bool) -> Bool: match nodes found: case _ True{}: True{} case Nil{} False{}: False{} case Con{Lint.Node{Lint.Variable{v}, n, Some{s}, k, f}, rest} False{}: has(rest, b, U32.is_eq(v, b)) case Con{Lint.Node{syntax, n, s, kids, f}, rest} False{}: has(rest, b, has(kids, b, False{})) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Node https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Syntax