def le_digits

bend-collections-laws-math@1.0.0.0 · spec/math/fixed.bend:215

import bend-collections-laws-math@1.0.0.0/spec/math/fixed.bend as Fixed
import 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)