Source/Packages

Std.Byte

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

108 lines19 declarations3.5 KiBSHA-256 bd71181271d6

def · lines 42–51

byteMultiply

Full file
42def byteMultiply =
43  (lambda unrestricted left : Byte . unrestricted right : Byte .
44    app
45      (lambda unrestricted product : Nat .
46        constructor
47          ByteMultiplyResult
48          ByteMultiplyResultValue
49          (nat-to-byte (naturalModuloUnchecked product byteNaturalTwoHundredFiftySix))
50          (nat-to-byte (naturalDivideUnchecked product byteNaturalTwoHundredFiftySix)))
51      (naturalMultiply (byte-to-nat left) (byte-to-nat right)))

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.