def is_inside

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

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

157# Whether `x`, below `path`, or a node above it, is a value of a fork, or `found`.
158def is_inside(path: List<&2, Lint.Above>, x: Lint.Node, found: Bool) -> Bool:
159  match path found:
160    case _ True{}:
161      True{}
162    case Nil{} False{}:
163      False{}
164    case Con{Lint.Above{+p, at}, rest} False{}:
165      is_inside(rest, p, is_value(x, p, at))

Uses (5)

Used by (1)