yield
Table of Contents
Operator
yield — emit values from expressions
Synopsis
[yield] <expr> [, <expr>...]
Description
The yield
operator produces output values by evaluating one or more
expressions on each input value and sending each result to the output
in left-to-right order. Each <expr>
may be any valid
expression.
The yield
keyword is optional since it is an
implied operator.
Examples
Hello, world
yield "hello, world"
true
Loading...
Yield evaluates each expression for every input value
yield 1,2
null
null
null
Loading...
Yield typically operates on its input
yield this*2+1
1
2
3
Loading...
Yield is often used to transform records
yield [a,b],[b,a] |> collect(this)
{a:1,b:2}{a:3,b:4}
Loading...