def le_digits
import bend-collections-laws-math@1.0.0.0/spec/math/fixed.bend as Fixedimport Base
import bend-collections-laws-math@1.0.0.0/spec/lib/common.bend as C
215# the k lowest base-256 digits of n, least significant first
216def le_digits(k: Nat, +n: Nat) -> List<&2, Nat>:
217 match k:
218 case 0n:
219 Nil{}
220 case 1n+p:
221 Con{C.low(8n, n), le_digits(p, C.high(8n, n))}
Uses (4)
Used by (7)
- bend-collections-laws-math@1.0.0.0/spec/math/fixed:ToBytes.be
- bend-collections-laws-math@1.0.0.0/spec/math/fixed:ToBytes.le
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/fixbytes:dsplit
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/fixbytes:to_be32
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/fixbytes:to_le32
- …