ListIndexLoop.passes: def of bend-lint-rules@0.2.0.0 Import: import bend-lint-rules@0.2.0.0/performance/list_index_loop.bend as ListIndexLoop Lines 136-155 of bend-lint-rules@0.2.0.0/performance/list_index_loop.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-rules@0.2.0.0/performance/list_index_loop.bend&start_line=136&end_line=155 import Base import bend-lint-api@0.2.0.0/linter/lint.bend as Lint # Whether a call of `target` among `nodes`, or under them, passes the binder `b` unchanged, or `found`. def passes(nodes: List<&2, Lint.Node>, +target: String, +b: U32, found: Bool) -> Bool: match nodes found: case _ True{}: True{} case Nil{} False{}: False{} case Con{ Lint.Node{ Lint.Application{}, n, s, Con{Lint.Node{Lint.Reference{t}, rn, rs, rk, rf}, +args}, f }, rest } False{}: passes(rest, target, b, passes(args, target, b, is_passed.if(String.eq(t, target), args, b))) case Con{Lint.Node{syntax, n, s, kids, f}, rest} False{}: passes(rest, target, b, passes(kids, target, b, False{})) Uses (8): 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=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 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 https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/performance/list_index_loop.bend&name=is_passed.if