def count_halves

bend-visgraph@2.0.0.0 · visgraph.bend:901

import bend-visgraph@2.0.0.0/visgraph.bend as Visgraph
import Base

901def count_halves(es: Edges, +both: Bool, c: Counts) -> Counts:
902  match es:
903    case ENil{}:
904      c
905    case ECon{+s, +t, w, next}:
906      count_halves(next, both, count_half(both, t, s, count_half(True{}, s, t, c)))
907    case EJoin{a, b}:
908      count_halves(b, both, count_halves(a, both, c))

Uses (4)

Used by (1)