LoopInvariantCall.has_call: def of bend-lint-rules@0.2.0.0 Import: import bend-lint-rules@0.2.0.0/performance/loop_invariant_call.bend as LoopInvariantCall Lines 164-183 of bend-lint-rules@0.2.0.0/performance/loop_invariant_call.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-rules@0.2.0.0/performance/loop_invariant_call.bend&start_line=164&end_line=183 import Base import bend-lint-api@0.2.0.0/linter/lint.bend as Lint # Whether a call of `target` is among `nodes` or under them, or `found`. def has_call(nodes: List<&2, Lint.Node>, +target: String, 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{}: has_call(rest, target, has_call(args, target, String.eq(t, target))) case Con{Lint.Node{syntax, n, s, kids, f}, rest} False{}: has_call(rest, target, has_call(kids, target, False{})) Uses (6): 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=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