Source/Packages

Std.Natural

packages/foundation/standard/src/Std/Natural.alpha

335 lines48 declarations13.5 KiBSHA-256 0a0af2339e6a

def · lines 243–245

naturalAtMostBytePower

Full file
"value <= 256^byteCount", as (value - 1) < 256^byteCount with the saturating predecessor: 0 qualifies, 256^byteCount itself qualifies, one more does not. Callers that wrote `naturalLessOrEqual x bound` keep exactly that bound.
243def naturalAtMostBytePower =
244  (lambda unrestricted byteCount : Nat . unrestricted value : Nat .
245    naturalBelowBytePower byteCount (naturalPredecessor value))

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.