Skip to content

Commit f631fd2

Browse files
committed
Add info about nested predicates
1 parent 09c0b34 commit f631fd2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Diff for: docs/language-definition.md

+11
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,17 @@ Braces `{` `}` can be omitted:
296296
filter(tweets, len(.Content) > 240)
297297
```
298298

299+
:::tip
300+
In nested predicates, to access the outer variable, use [variables](#variables).
301+
302+
```expr
303+
filter(posts, {
304+
let post = #;
305+
any(.Comments, .Author == post.Author)
306+
})
307+
```
308+
:::
309+
299310
## String Functions
300311

301312
### trim(str[, chars]) {#trim}

0 commit comments

Comments
 (0)