fix: make last(empty) yield no output values (#3179)
This commit is contained in:
1 parent
3c5707f7fb
commit
a7b22539a4
6 files changed
+46
-4
No files matched your search
@@ -3069,9 +3069,12 @@ sections:
|
||||
Note that `nth(n; expr)` doesn't support negative values of `n`.
|
||||
|
||||
examples:
|
||||
- program: '[first(range(.)), last(range(.)), nth(./2; range(.))]'
|
||||
- program: '[first(range(.)), last(range(.)), nth(5; range(.))]'
|
||||
input: '10'
|
||||
output: ['[0,9,5]']
|
||||
- program: '[first(empty), last(empty), nth(5; empty)]'
|
||||
input: 'null'
|
||||
output: ['[]']
|
||||
|
||||
- title: "`first`, `last`, `nth(n)`"
|
||||
body: |
|
||||
|
||||
Reference in new issue
Block a user