DecreasingCall.taken: def of bend-lint-rules@0.2.0.0 Import: import bend-lint-rules@0.2.0.0/language/decreasing_call.bend as DecreasingCall Lines 86-111 of bend-lint-rules@0.2.0.0/language/decreasing_call.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-rules@0.2.0.0/language/decreasing_call.bend&start_line=86&end_line=111 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 # What a case's patterns take apart: each pattern, a constructor, makes its variables smaller than its # scrutinee, and than all that scrutinee is smaller than. def taken( scrutinees: List<&2, Lint.Node>, patterns: List<&2, Lint.Node>, +smaller: List<&2, Smaller> ) -> List<&2, Smaller>: match scrutinees patterns: case Con{ Lint.Node{Lint.Variable{s}, n, sp, k, f}, more } Con{Lint.Node{Lint.PatternConstructor{t}, pn, ps, kids, pf}, rest}: taken( more, rest, Lists.onto( &2, Smaller, pairs(roots(smaller, s, []), Lint.Node.bound(kids, []), []), smaller ) ) case Con{x, more} Con{y, rest}: taken(more, rest, smaller) case _ _: smaller Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List 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=Node.bound 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=onto https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/language/decreasing_call.bend&name=Smaller https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/language/decreasing_call.bend&name=pairs https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/language/decreasing_call.bend&name=roots