Chacha8rand.initial: def of bend-collections-laws-math@1.0.0.0 Import: import bend-collections-laws-math@1.0.0.0/spec/math/random/chacha8rand.bend as Chacha8rand Lines 100-106 of bend-collections-laws-math@1.0.0.0/spec/math/random/chacha8rand.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-math@1.0.0.0/spec/math/random/chacha8rand.bend&start_line=100&end_line=106 import Base # RFC 8439 2.3: constants, key (eight words), block counter, nonce (here zero) def initial(key: List<&2, U32>, +ctr: U32) -> List<&2, U32>: match key: case [k0, k1, k2, k3, k4, k5, k6, k7]: [1634760805, 857760878, 2036477234, 1797285236, k0, k1, k2, k3, k4, k5, k6, k7, ctr, 0, 0, 0] case _: [] Uses (2): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32