TemplateValueField.templates: def of bend-lint-rules@0.2.0.0 Import: import bend-lint-rules@0.2.0.0/performance/template_value_field.bend as TemplateValueField Lines 84-104 of bend-lint-rules@0.2.0.0/performance/template_value_field.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-rules@0.2.0.0/performance/template_value_field.bend&start_line=84&end_line=104 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 binders of the templates among a definition's nodes whose type is one of `records`, onto `out`. def templates( nodes: List<&2, Lint.Node>, +records: List<&2, String>, out: List<&2, U32> ) -> List<&2, U32>: match nodes: case Nil{}: out case Con{Lint.Node{Lint.Parameter{b, Lint.Template{}}, n, s, kids, f}, rest}: templates( rest, records, Lists.push( U32, Lists.when(U32, List.contains(~String, ~String.eq, records, written(kids)), b), out ) ) case Con{node, rest}: templates(rest, records, out) 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=List.contains https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq 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=Quantity 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/template_value_field.bend&name=written