def next_word

bend-collections@1.0.0.0 · src/crypto/sha/core.bend:69

import bend-collections@1.0.0.0/src/crypto/sha/core.bend as Core
import Base

69# Schedule histories always contain at least 16 words. Destructuring that prefix
70# avoids four independent linked-list walks for every expanded word; the fallback
71# preserves the total behavior used by the universal refinement theorem.
72def next_word(+history: List<&2, U32>) -> U32:
73  match history:
74    case a <> b <> c <> d <> e <> f <> g <> h <> i <> j <> k <> l <> m <> n <> o <> (p <> rest):
75      (small1(b) + g + small0(o) + p : U32)
76    case _:
77      next_word_slow(history)

Uses (6)

Used by (5)