def binders

bend-lint-rules@0.2.0.0 · performance/deep_call_in_fork.bend:122

import bend-lint-rules@0.2.0.0/performance/deep_call_in_fork.bend as DeepCallInFork
import Base
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint

122def binders(nodes: List<&2, Lint.Node>, n: Nat) -> Nat:
123  match nodes:
124    case Nil{}:
125      n
126    case Con{Lint.Node{Lint.PatternVariable{b, q}, nm, s, k, f}, rest}:
127      binders(rest, 1n+n)
128    case Con{node, rest}:
129      binders(rest, n)

Uses (4)

Used by (3)