This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
The following commit(s) were added to refs/heads/master by this push:
new 54550d282f Expand Times Step reference section with example and fix
javadoc link text
54550d282f is described below
commit 54550d282f64772b41acc2bcc3ccf55b07b1c164
Author: Stephen Mallette <[email protected]>
AuthorDate: Thu Aug 13 12:26:07 2026 +0000
Expand Times Step reference section with example and fix javadoc link text
The Times Step reference section was a single sentence with no runnable
example. Add a brief explanation that times(N) sets the number of repeat()
loops and has no effect without a repeat(), a short live example, and a
cross-reference to the repeat()-step section for positioning and loop
semantics (rather than duplicating them here). Also correct the mislabeled
'Additional References' link whose visible text read until(Predicate) while
its URL targets times(int).
Assisted-by: Kiro:claude-opus-4.8
---
docs/src/reference/the-traversal.asciidoc | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/docs/src/reference/the-traversal.asciidoc
b/docs/src/reference/the-traversal.asciidoc
index 39b2612516..0c6792c0bf 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -5599,12 +5599,22 @@
link:++https://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gre
[[times-step]]
=== Times Step
-The `times`-step is not an actual step, but is instead a step modulator for
`<<repeat-step,repeat()>>` (find more
-documentation on the `times()` there).
+The `times`-step is not an actual step, but is instead a step modulator for
`<<repeat-step,repeat()>>`. It sets
+the number of times the `repeat()` body is executed: `times(N)` loops the body
exactly `N` times. It has no
+effect on its own and must accompany a `repeat()`.
+
+[gremlin-groovy,modern]
+----
+g.V(1).repeat(out()).times(2)
+----
+
+Whether `times()` is placed before or after `repeat()` determines the loop
semantics (while-do versus do-while),
+as with `<<until-step,until()>>`. See the <<repeat-step,`repeat()`>>-step
section for those positioning details
+and the general loop semantics.
*Additional References*
-link:++https://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#times(int)++[`until(Predicate)`],
+link:++https://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#times(int)++[`times(int)`],
`<<emit-step,emit()>>`, `<<repeat-step,repeat()>>`, `<<until-step,until()>>`
[[to-step]]