Skip to content

Commit 47eae7e

Browse files
committed
Add pipe docs
1 parent 8f2cfbf commit 47eae7e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/Language-Definition.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@
110110
<code>[:]</code>
111111
</td>
112112
</tr>
113+
<tr>
114+
<td>Pipe</td>
115+
<td>
116+
<code>|</code>
117+
</td>
118+
</tr>
113119
</table>
114120

115121
Examples:
@@ -168,6 +174,17 @@ array[3:] == [4, 5]
168174
array[:] == array
169175
```
170176

177+
### Pipe Operator
178+
179+
The pipe operator `|` can be used to pass the result of the left-hand side
180+
expression as the first argument of the right-hand side expression.
181+
182+
For example, expression `split(lower(user.Name), " ")` can be written as:
183+
184+
```expr
185+
user.Name | lower() | split(" ")
186+
```
187+
171188
## Built-in Functions
172189

173190
### all(array, predicate)

0 commit comments

Comments
 (0)