def is_recursive

bend-lint-api@0.2.0.0 · linter/lint.bend:383

import bend-lint-api@0.2.0.0/linter/lint.bend as Lint
import Base

383# Whether a node is an application of the definition it is in, below `path`: a step of a loop, as Bend repeats work by
384# recursion.
385def is_recursive(path: List<&2, Above>, +node: Node) -> Bool:
386  match node:
387    case Node{Application{}, n, s, Con{Node{Reference{called}, rn, rs, rk, rf}, args}, f}:
388      calls(called, top(path, node))
389    case _:
390      False{}

Uses (7)

Used by (7)