lang
and<terms>
Parameterized pattern that the input value satisifies all members of the list parameters.
chain<terms>
Parameterized pattern that passes the input value to the first member of the chain, and its output to the next, and so on and so forth.
or<terms>
Parameterized pattern that the input value satisifies at least one member of the list parameters. If the parameter is a list of patterns, each pattern will be individually checked. If the parameter is not a list of patterns, the parameter is first evaluated, and if the result is a list of patterns, then the process proceeds as above.
refine<refinement>
Pattern which applies the first parameter pattern, and if successful, applies the second the output of the first.
traverse<step>
Pattern which produces the result of traversing to the named field of an input object.
Example pattern:
pattern person = lang::traverse<"person">
pattern name = person(lang::traverse<"name">)
This can also be written as:
pattern person = lang::traverse<"person">
pattern name = person(self.name)
Example input:
{
"type": "something",
"person": {
"name": "Fletch",
"age": 48
},
"location": "some location"
}
Evaluating the name
pattern will in this case result in "Fletch".