def judge

bend-lint-pack@0.1.1.0 · graph/fan_in.bend:28

import bend-lint-pack@0.1.1.0/graph/fan_in.bend as FanIn
import Base
import bend-lint-pack@0.1.1.0/vendor/lint.bend as Lint
import bend-lint-pack@0.1.1.0/common.bend as Common

28def judge(
29  seen: List<&2, Common.Seen>,
30  +max: U32,
31  +nodes: Set(),
32  +into: Map<&2, List<&2, String>>,
33  out: List<&2, Lint.Diag>
34) -> List<&2, Lint.Diag>:
35  match seen:
36    case Nil{}:
37      List.reverse(&2, Lint.Diag, out)
38    case Con{Common.Seen{+owner, span}, rest}:
39      judge(
40        rest,
41        max,
42        nodes,
43        into,
44        Common.onto(
45          judge.one(Common.degree(into, nodes, owner), max, owner, span),
46          out
47        )
48      )

Uses (11)

Used by (1)