Pipelines and chaining¶
New in 1.4
The => pipeline operator and explicit named bindings are part of the
new parser. To use them, ensure the engine is built from a 1.4 or later
release.
The pipeline operator => chains rules explicitly, with named field
bindings flowing between steps. It replaces the implicit field-flow model
of the older syntax for cases where readability matters.
Single-line pipeline¶
Read left-to-right: take :source_field, cast to string, pad with leading
zeros to length 5, store as :zip.
Multi-step pipelines¶
A pipeline with several aggregating steps composes naturally:
Why pipelines are preferred over input/output filters¶
The pre-pipeline syntax used input filters and output lists for the same job. Pipelines compile to the same execution but read more naturally and allow intermediate values to be reused without spelling out every filter.
See also: Conditional Chaining, ForEach and Blocks.