def ph_cnt
import bendtorch-fast@1.3.0.0/main.bend as BendtorchFastimport Base
import bendtorch@1.3.0.0/main.bend as T
95# the elements of a block of cnt words from element e0, the last block stopping at n
96def ph_cnt(+n: U32, +e0: U32, +cnt: Nat) -> Nat:
97 +k = U32.from_nat(Nat.add(cnt, cnt))
98 U32.to_nat(T.ph_pick(U32.is_lt(k, (n - e0 : U32)), k, (n - e0 : U32)))