def degrees.into
import bend-visgraph@2.0.0.0/visgraph.bend as Visgraphimport Base
561# The degrees of the nodes of `es`, added into `d`; parallel.bend counts
562# them on every thread.
563def degrees.into(es: Edges, d: Array<U32>) -> Array<U32>:
564 match es:
565 case ENil{}:
566 d
567 case ECon{s, t, w, next}:
568 degrees.into(next, atomic_bump(atomic_bump(d, s), t))
569 case EJoin{a, b}:
570 degrees.into(b, degrees.into(a, d))