Histogram.grp.one: def of bend-parallel@0.1.0.0 Import: import bend-parallel@0.1.0.0/histogram.bend as Histogram Lines 198-210 of bend-parallel@0.1.0.0/histogram.bend: https://jend.leeeet.dev/read.txt?path=bend-parallel@0.1.0.0/histogram.bend&start_line=198&end_line=210 import Base # Column c of a group (rows from top, nm + 1 of them, step apart), when # c < K: sc, each entry becomes the group's sum through it; else the sum # goes into the last row (at last). def grp.one(lt: Bool, +sc: Bool, +c: U32, +top: U32, +last: U32, +step: U32, +nm: Nat, t: Array) -> Array: match lt: case True{}: match sc: case True{}: ins.go(nm, (top + c : U32), step, 0, t[(top + c : U32)]) case False{}: grp.put((last + c : U32), col.go(nm, (top + c : U32), step, 0, t[(top + c : U32)])) case False{}: t Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.get https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=bend-parallel@0.1.0.0/histogram.bend&name=col.go https://jend.leeeet.dev/definition.txt?path=bend-parallel@0.1.0.0/histogram.bend&name=grp.put https://jend.leeeet.dev/definition.txt?path=bend-parallel@0.1.0.0/histogram.bend&name=ins.go