def known

bend-lint-rules@0.2.0.0 · language/decreasing_call.bend:131

import bend-lint-rules@0.2.0.0/language/decreasing_call.bend as DecreasingCall
import Base
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint

131# What the cases above a call (`chain`, outermost first; `parent` is the node above the first) take apart.
132def known(
133  chain: List<&2, Lint.Above>,
134  parent: Maybe<&2, Lint.Node>,
135  smaller: List<&2, Smaller>
136) -> List<&2, Smaller>:
137  match chain:
138    case Nil{}:
139      smaller
140    case Con{Lint.Above{+node, at}, rest}:
141      known(rest, Some{node}, known.at(parent, node, smaller))

Uses (6)

Used by (1)