def fold256
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/hash/incremental.bend as Incrementalimport Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/hash.bend as H
199# The state after each chunk in turn.
200def fold256(cs: List<&2, List<&2, U32>>, +q: Nat, st: H.Sha256State) -> H.Sha256State:
201 match cs:
202 case Nil{}:
203 st
204 case c <> ct:
205 fold256(ct, q, H.step256(st, c, q))