summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/content/manual/manual.yml16
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/content/manual/manual.yml b/docs/content/manual/manual.yml
index 8cec7bc..442fc0d 100644
--- a/docs/content/manual/manual.yml
+++ b/docs/content/manual/manual.yml
@@ -1664,6 +1664,22 @@ sections:
input: '1'
output: ['[1,2,4,8,16,32,64]']
+ - title: "`repeat(exp)`"
+ body: |
+
+ The `repeat(exp)` function allows you to repeatedly
+ apply expression `exp` to `.` until an error is raised.
+
+ Note that `repeat(exp)` is internally defined as a
+ recursive jq function. Recursive calls within `repeat` will
+ not consume additional memory if `exp` produces at most one
+ output for each input. See advanced topics below.
+
+ examples:
+ - program: '[repeat(.*2, error)?]'
+ input: '1'
+ output: ['[2]']
+
- title: "`until(cond; next)`"
body: |