def judge
bend-lint-pack@0.1.1.0 · graph/fan_out.bend:28
import bend-lint-pack@0.1.1.0/graph/fan_out.bend as FanOut
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 +edges: 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 edges,
44 Common.onto(
45 judge.one(Common.degree(edges, nodes, owner), max, owner, span),
46 out
47 )
48 )