Rx: Simple, Extensible Schemata
//seq
The //seq type is for a sequence of values that may be of differing types. It must have a contents parameter, which is a list of zero or more schemata. To be accepted, input must have at least as many entries as the contents parameter, and each item in the input must match the schema in the corresponding position in the //seq contents.
If a tail parameter is given, it will be used to check the contents of the input beyond the last item of the contents. In other words, given a five-item input against a three-item //seq, the tail will be used to check the last two items.
If there are more input items than content schemata and no tail is provided, the input will be rejected.
/.meta/seq, the schema for //seq definitions:
{ "type": "//rec", "required": { "type": { "type": "//str", "value": "//seq" }, "contents": { "type": "//arr", "contents": "/.meta/schema" } }, "optional": { "tail": "/.meta/schema" } }