def templates

bend-lint-rules@0.2.0.0 · performance/eager_branch.bend:181

import bend-lint-rules@0.2.0.0/performance/eager_branch.bend as EagerBranch
import Base
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint

181# The binders of the `~` parameters among a definition's nodes, onto `out`: a call of one is inlined, not a closure's.
182def templates(nodes: List<&2, Lint.Node>, out: List<&2, U32>) -> List<&2, U32>:
183  match nodes:
184    case Nil{}:
185      out
186    case Con{Lint.Node{Lint.Parameter{b, Lint.Template{}}, n, s, k, f}, rest}:
187      templates(rest, b <> out)
188    case Con{node, rest}:
189      templates(rest, out)

Uses (5)

Used by (1)