def counts.prefix
import gralha-coverage@0.1.0.1/cover.bend as Coverimport Base
771def counts.prefix(st: Array<U32> & U32, n: Nat, +i: U32) -> Array<U32> & U32:
772 (c, acc) = st
773 match n:
774 case 0n: (c, acc)
775 case 1n+d: counts.prefix(counts.prefix.got(Array.get(U32, c, i), i, acc), d, (i + 1 : U32))