Skip to content

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

:source_field => AsString() => PrePad(5, "0") => :zip

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:

:int1, :int4 => Min() => :min
:int2, :int3 => Max() => :max
Selector(:min, "<", :max, :min, :max)

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.