A collection spec represents a collection of elements, each of which is itself schematized.
A collection spec represents a collection of elements, each of which is itself schematized.
(collection-spec pre konstructor elements on-error)
A collection represents a collection of elements, each of which is itself schematized. At the top level, the collection has a precondition (presumably on the overall type), a constructor for the collection from a sequence of items, an element spec, and a function that constructs a descriptive error on failure.
The element spec is a nested list structure, in which the leaf elements each
provide an element schema, parser (allowing for efficient processing of structured
collections), and optional error wrapper. Each item in the list can be a leaf
element or an optional
nested element spec (see below). In addition, the final
element can be a remaining
schema (see below).
Note that the optional
carries no semantics with respect to validation;
the user must ensure that the parser enforces the desired semantics, which
should match the structure of the spec for proper generation.
A collection represents a collection of elements, each of which is itself schematized. At the top level, the collection has a precondition (presumably on the overall type), a constructor for the collection from a sequence of items, an element spec, and a function that constructs a descriptive error on failure. The element spec is a nested list structure, in which the leaf elements each provide an element schema, parser (allowing for efficient processing of structured collections), and optional error wrapper. Each item in the list can be a leaf element or an `optional` nested element spec (see below). In addition, the final element can be a `remaining` schema (see below). Note that the `optional` carries no semantics with respect to validation; the user must ensure that the parser enforces the desired semantics, which should match the structure of the spec for proper generation.
(optional & ss)
If any more elements are present, they must match the elements in 'ss'
If any more elements are present, they must match the elements in 'ss'
(remaining s)
All remaining elements must match schema s
All remaining elements must match schema s
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close