Decimal digit bytes, most significant first, to a word modulo 2^32; one
step per digit. Callers check the bytes are digits and the value fits.
386def modelWord32FromDecimalDigitsTruncated =
387 (lambda unrestricted digits : Bytes .
388 app
389 (bytes-eliminate
390 (lambda unrestricted current : Bytes .
391 pi unrestricted accumulator : (family ModelWord32) . family ModelWord32)
392 (lambda unrestricted accumulator : (family ModelWord32) . accumulator)
393 (lambda unrestricted head : Byte .
394 unrestricted tail : Bytes .
395 unrestricted induction : (pi unrestricted accumulator : (family ModelWord32) . family ModelWord32) .
396 unrestricted accumulator : (family ModelWord32) .
397 induction
398 (modelWord32Add (modelWord32TimesTen accumulator) (modelWord32DecimalDigit head)))
399 digits)
400 modelWord32Zero)The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.