We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
skip/2
1 parent 0eaa0f0 commit 1fa88d2Copy full SHA for 1fa88d2
jaq-std/src/defs.jq
@@ -99,6 +99,7 @@ def last: .[-1];
99
def nth(n): .[ n];
100
101
def last(g): (reduce g as $item ([]; [$item]))[];
102
+def skip($n; g): foreach g as $x ([$n]; [.[0] - 1, $x]) | if .[0] < 0 then .[1] else empty end;
103
def nth(n; g): last(limit(n + 1; g));
104
105
# Predicates
0 commit comments