def deep.if

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

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

64# Whether a definition with the nodes `k` counts, if it calls itself outside a tail position (`found`): each does if
65# `forking`, else one without a parallel let.
66def deep.if(found: Bool, forking: Bool, k: List<&2, Lint.Node>) -> Bool:
67  match found forking:
68    case False{} _:
69      False{}
70    case True{} True{}:
71      True{}
72    case True{} False{}:
73      Bool.not(Lint.forks(k, False{}))

Uses (5)

Used by (1)