Source/Packages

Std.Word

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

1,783 lines192 declarations64.2 KiBSHA-256 27bf8c3f30ee

def · lines 1048–1054

stdU16EncodeLE

Full file
U16 (no owner had a 16-bit codec): the same three shapes, built in the owner's style. The bounded read answers Std.Codec's StdDecoded (value + rest, or truncated); the exact decode answers StdOption (absent unless the input is exactly two bytes).
1048def stdU16EncodeLE =
1049  (lambda unrestricted value : (family StdU16) .
1050    (eliminate
1051      StdU16
1052      (lambda unrestricted current : (family StdU16) . Bytes)
1053      value
1054      (branch StdU16Of low high . (bytes-cons low (bytes-cons high b"")))))

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.