LoopInvariantCall.fixed: 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 96-115 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=96&end_line=115 import Base import bend-lint-api@0.2.0.0/linter/lint.bend as Lint import bend-lint-api@0.2.0.0/shared/lists.bend as Lists # The runtime parameters among a definition's nodes that it passes unchanged to each of `calls` (its calls of itself), # by binder; `at` counts the runtime parameters, as the calls' arguments do. def fixed( nodes: List<&2, Lint.Node>, +calls: List<&2, List<&2, Lint.Node>>, +at: Nat, out: List<&2, U32> ) -> List<&2, U32>: match nodes: case Nil{}: out case Con{Lint.Node{Lint.Parameter{+b, q}, n, s, k, f}, rest}: fixed( rest, calls, 1n+at, Lists.push(U32, Lists.when(U32, passed(calls, at, b, True{}), b), out) ) case Con{node, rest}: fixed(rest, calls, at, out) Uses (9): 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=Nat 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-api@0.2.0.0/shared/lists.bend&name=push https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/shared/lists.bend&name=when https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/performance/loop_invariant_call.bend&name=passed