def col.one
import bend-parallel@0.1.0.0/histogram.bend as Histogramimport Base
249# Column c's count into cs[c]: the sum of its nb + 1 entries from o + c,
250# step apart (the groups' last rows), when c < K; else 0.
251def col.one(lt: Bool, +c: U32, +o: U32, +step: U32, +nb: Nat, p: Two) -> Two:
252 match lt:
253 case True{}:
254 Two{t, cs} = p
255 col.put(c, cs, col.go(nb, (o + c : U32), step, 0, t[(o + c : U32)]))
256 case False{}:
257 Two{t, cs} = p
258 Two{t, cs[c] <- 0}