4 List Packings
(require (planet "list.ss" ("murphy" "packed-io.plt" 1 0))) |
This module provides packings of value lists and other data structures.
4.1 Pairs and Lists
Produces a packing for pair values that stores the car and
cdr fields in sequence using the packings
car-packing and cdr-packing.
(list/p packing ...) → packing? |
packing : packing? |
Produces a packing for lists of fixed size that stores the elements of the list in sequence using the given packings.
Produces a packing for a homogeneous list of unlimited size that
stores the elements in sequence using the given packing.
Combine this with with-size/p to pack a list together with length information.
4.2 Derived Types
Produces a packing for a homogeneous dictionary of unlimited size
that stores the key value pairs in sequence using the packings
key-packing and value-packing.
When packing, any value satisfying dict? can be used, when unpacking the resulting value is an immutable hash table.
Combine this with with-size/p to pack a dictionary together with length information.