def sum.col
import bend-parallel@0.1.0.0/sort.bend as Sortimport Base
import bend-parallel@0.1.0.0/histogram.bend as Hist
103# The nb + 1 entries from at, step apart: their sum; when wr, each also
104# becomes the sum of those before it.
105def sum.col(+wr: Bool, +at: U32, +step: U32, +nb: Nat, t: Array<U32>) -> Array<U32> & U32:
106 match wr:
107 case True{}:
108 xs.go(nb, at, step, 0, t[at])
109 case False{}:
110 Hist.col.go(nb, at, step, 0, t[at])