def halve

bend-visgraph@2.0.0.0 · parallel.bend:103

import bend-visgraph@2.0.0.0/parallel.bend as Parallel
import Base

103def halve(k: Nat, cs: Chunks, +na: U32, +total: U32, acc: Chunks) -> Halves:
104  match k cs:
105    case 1n+q CCon{+start, +count, next}:
106      halve(q, next, na, total, CCon{start, count, acc})
107    case _ _:
108      Halves{acc, na, cs, (total - na : U32)}

Uses (5)

Used by (1)