#lang scribble/doc @(require scribble/manual (for-label "../packing.ss")) @title[#:tag "list"]{List Packings} @local-table-of-contents[] @defmodule[(planet "list.ss" ("murphy" "packed-io.plt" 1 0))]{ This module provides packings of value lists and other data structures. } @section{Pairs and Lists} @defproc[(cons/p [car-packing packing?] [cdr-packing packing?]) packing?]{ Produces a packing for pair values that stores the @scheme[car] and @scheme[cdr] fields in sequence using the packings @scheme[car-packing] and @scheme[cdr-packing]. } @defproc[(list/p [packing packing?] ...) packing?]{ Produces a packing for lists of fixed size that stores the elements of the list in sequence using the given packings. } @defproc[(listof/p [packing packing?]) packing?]{ Produces a packing for a homogeneous list of unlimited size that stores the elements in sequence using the given @scheme[packing]. Combine this with @scheme[with-size/p] to pack a list together with length information. } @section[#:tag "list-derived"]{Derived Types} @defproc[(dict/p [key-packing packing?] [value-packing packing?]) packing?]{ Produces a packing for a homogeneous dictionary of unlimited size that stores the key value pairs in sequence using the packings @scheme[key-packing] and @scheme[value-packing]. When packing, any value satisfying @scheme[dict?] can be used, when unpacking the resulting value is an immutable hash table. Combine this with @scheme[with-size/p] to pack a dictionary together with length information. }