def stream_go
bend-collections-laws-crypto@1.0.0.0 · spec/math/random/chacha8rand.bend:194
import bend-collections-laws-crypto@1.0.0.0/spec/math/random/chacha8rand.bend as Chacha8rand
import Base
import bend-collections-laws-crypto@1.0.0.0/src/math/u64.bend as W
194
195
196def stream_go(n: Nat, buf: List<&2, W.U64>, +key: List<&2, U32>) -> List<&2, W.U64>:
197 match n buf:
198 case 0n _:
199 []
200 case 1n+p Con{x, rest}:
201 Con{x, stream_go(p, rest, key)}
202 case 1n+p Nil{}:
203 Con{head(words64(output(key))), stream_go(p, tail(words64(output(key))), next_key(key))}