def applies

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

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

213# Whether a definition's nodes apply a closure, or `found`.
214def applies(+kids: List<&2, Lint.Node>, found: Bool) -> Bool:
215  match found:
216    case True{}:
217      True{}
218    case False{}:
219      Bool.not(
220        List.is_empty(
221          &2,
222          Unit,
223          Lint.visit(~List<&2, U32>, ~Unit, ~applies.visit, templates(kids, []), kids)
224        )
225      )

Uses (10)

Used by (1)