Skip to content
Myr

docs: Document repeat(exp)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Mattias Wadman · committed by Nico Williams · parent f2ad951 · Browse files · 1 file+16 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+16 added−0 removed

  • other:+16 added−0 removed

1 file+16 added−0 removed

modified:docs/content/manual/manual.yml+16 added
1662 unmodified lines
1663 - program: '[while(.<100; .*2)]'1664 input: '1'1665 output: ['[1,2,4,8,16,32,64]']16661667 - title: "`repeat(exp)`"1668 body: |16691670 The `repeat(exp)` function allows you to repeatedly1671 apply expression `exp` to `.` until an error is raised.16721673 Note that `repeat(exp)` is internally defined as a1674 recursive jq function. Recursive calls within `repeat` will1675 not consume additional memory if `exp` produces at most one1676 output for each input. See advanced topics below.16771678 examples:1679 - program: '[repeat(.*2, error)?]'1680 input: '1'1681 output: ['[2]']16821683 - title: "`until(cond; next)`"1684 body: |16851686 The `until(cond; next)` function allows you to repeatedly
1702 unmodified lines