EagerBranch.costly: def of bend-lint-rules@0.2.0.0 Import: import bend-lint-rules@0.2.0.0/performance/eager_branch.bend as EagerBranch Lines 279-294 of bend-lint-rules@0.2.0.0/performance/eager_branch.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-rules@0.2.0.0/performance/eager_branch.bend&start_line=279&end_line=294 import Base import bend-lint-api@0.2.0.0/linter/lint.bend as Lint # The definitions of the program a call of which runs a loop to its end, even when its value is unused: a loop that does # not compile to a native loop, as its body, or one it calls, keeps it from that (see program.unflat); or a definition # that calls such a loop. def costly(+sources: List<&2, Lint.Source>, +defs: Map<&2, Maybe<&2, Lint.Def>>) -> Set(): Lint.Program.callers( sources, defs, Set.from_list( loops( Map.keys(&2, Maybe<&2, Lint.Def>, defs), defs, Lint.Program.callers(sources, defs, Set.from_list(program.unflat(sources, []))), [] ) ) ) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Map https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Map.keys https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Set https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Set.from_list https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Def https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Program.callers https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/linter/lint.bend&name=Source https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/performance/eager_branch.bend&name=loops https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/performance/eager_branch.bend&name=program.unflat