def uses
bend-lint-rules@0.2.0.0 · performance/missed_fork.bend:298
import bend-lint-rules@0.2.0.0/performance/missed_fork.bend as MissedFork
import Base
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint
298
299def uses(nodes: List<&2, Lint.Node>, +binders: List<&2, U32>, found: Bool) -> Bool:
300 match nodes found:
301 case _ True{}:
302 True{}
303 case Nil{} False{}:
304 False{}
305 case Con{Lint.Node{Lint.Variable{v}, n, Some{s}, k, f}, rest} False{}:
306 uses(rest, binders, List.contains(~U32, ~U32.is_eq, binders, v))
307 case Con{Lint.Node{syntax, n, s, kids, f}, rest} False{}:
308 uses(rest, binders, uses(kids, binders, False{}))