fix: make last(empty) yield no output values (#3179)

This commit is contained in:
itchyny authored and GitHub committed 2024-11-13 20:35:50 +09:00
1 parent 3c5707f7fb
commit a7b22539a4
6 files changed
+46 -4

No files matched your search

+4
View File
@@ -362,6 +362,10 @@ null
10
[0,9]
[first(range(.)), last(range(.))]
0
[]
[nth(0,5,9,10,15; range(.)), try nth(-1; range(.)) catch .]
10
[0,5,9,"nth doesn't support negative indices"]