EagerBranch.loops: 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 257-277 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=257&end_line=277 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 import bend-lint-api@0.2.0.0/shared/names.bend as Names import bend-lint-api@0.2.0.0/shared/sets.bend as Sets # The definitions among `names` that call themselves and are in `unflat`, onto `out`. def loops( names: List<&2, String>, +defs: Map<&2, Maybe<&2, Lint.Def>>, +unflat: Set(), out: List<&2, String> ) -> List<&2, String>: match names: case Nil{}: out case Con{+t, rest}: loops( rest, defs, unflat, Lists.push( String, Lists.when(String, Sets.has(unflat, t) && calls_itself(Names.find(Lint.Def, defs, t)), t), out ) ) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and 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=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Set https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String 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/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-api@0.2.0.0/shared/names.bend&name=find https://jend.leeeet.dev/definition.txt?path=bend-lint-api@0.2.0.0/shared/sets.bend&name=has https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/performance/eager_branch.bend&name=calls_itself