Blake2b.add: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/spec/crypto/blake/blake2b.bend as Blake2b Lines 19-25 of bend-collections-laws-crypto@1.0.0.0/spec/crypto/blake/blake2b.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/blake/blake2b.bend&start_line=19&end_line=25 import Base import bend-collections-laws-crypto@1.0.0.0/src/crypto/blake/blake2b/types.bend as T # (a + b) mod 2^64: the low halves add modulo 2^32; the high halves add the # carry out of the low half, which is 1 exactly when the low sum wrapped. def add(a: T.Lane, b: T.Lane) -> T.Lane: match a b: case T.W{+al,ah} T.W{bl,bh}: +lo = U32.add(al,bl) T.W{lo,U32.add(U32.add(ah,bh),Bool.to_u32(U32.is_lt(lo,al)))} Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.to_u32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_lt https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/blake/blake2b/types.bend&name=Lane