->
, the result of an expression
+ can be bound to the context value before evaluating another expression.
+ ->
evaluates an expression and
+ binds the result to the context value before evaluating another expression.
Each operation E1 -> E2
is evaluated as follows:
+ Expression E1 is evaluated to a sequence S
.
+ S then serves in turn to provide an inner
The following examples illustrate the use of pipeline operators:
+Tokenizes a string, counts the tokens, creates a concatenated string and returns
+ count=3
:
An equivalent expression is:
+
Calculates the sum of powers of 2
and returns
+ 2046
.
An equivalent expression is:
+
Doubles the values of a sequence, compares the values pairwise with another
+ sequence, checks if some comparisons were successful, and returns
+ true
.
An equivalent expression is:
+
Reduces a long sequence to at most 9 elements, with dots appended, + and returns a single string.
+An equivalent expression is:
+
!
)