Source/Packages

Std.Bytes

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

71 lines7 declarations3.2 KiBSHA-256 6f979afb4a88

def · lines 60–71

bytesPrefixBuilder

Full file
60def bytesPrefixBuilder =
61  (lambda unrestricted count : Nat .
62    nat-eliminate
63      (lambda unrestricted current : Nat . pi unrestricted input : Bytes . BytesBuilder)
64      (lambda unrestricted input : Bytes . (bytes-builder-empty))
65      (lambda unrestricted predecessor : Nat .
66        unrestricted induction : (pi unrestricted input : Bytes . BytesBuilder) .
67        unrestricted input : Bytes .
68        bytes-builder-append
69          (pipe input bytes-head (bytes-cons b"") bytes-builder-chunk)
70          (induction (bytes-tail input)))
71      count)

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.