DeadAccumulator.is_dead: def of bend-lint-rules@0.2.0.0 Import: import bend-lint-rules@0.2.0.0/performance/dead_accumulator.bend as DeadAccumulator Lines 77-89 of bend-lint-rules@0.2.0.0/performance/dead_accumulator.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-rules@0.2.0.0/performance/dead_accumulator.bend&start_line=77&end_line=89 import Base import bend-lint-api@0.2.0.0/linter/lint.bend as Lint # Whether a parameter of quantity `q` that is used as `kinds` says is a dead accumulator: it is there at run time, it # is only passed to the loop's own calls, and grows in one at least. def is_dead(q: Lint.Quantity, +kinds: List<&2, U32>) -> Bool: match q: case Lint.Erased{}: False{} case Lint.Template{}: False{} case _: Bool.not( List.contains(~U32, ~U32.is_eq, kinds, 0) ) && List.contains(~U32, ~U32.is_eq, kinds, 2) 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=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=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.contains 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=Quantity