def count_halves
import bend-visgraph@2.0.0.0/visgraph.bend as Visgraphimport 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))