def dig32
import bend-collections-laws-math@1.0.0.0/src/math/fixed.bend as Fixedimport Base
252# one more base-256 digit below the value so far: b + 256 z
253def dig32(r: Maybe<&2, U32>, ok: Bool, +b: U32) -> Maybe<&2, U32>:
254 match r:
255 case Some{+z}:
256 match ok:
257 case True{}:
258 Some{U32.add(b, U32.mul(z, 256))}
259 case False{}:
260 None{}
261 case None{}:
262 None{}
Uses (5)
Used by (6)
- bend-collections-laws-math@1.0.0.0/src/math/fixed:from4
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/fixbytes:from4_ok
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/fixbytes:d32_bnd
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/fixbytes:d32_sbnd
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/fixbytes:d32_some
- …