added a note on local()-step as recommended by @jeromatron.
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/fb90f881 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/fb90f881 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/fb90f881 Branch: refs/heads/tp32 Commit: fb90f881407d49ed6fc56ccfd20684837f418c98 Parents: 6579b01 Author: Marko A. Rodriguez <okramma...@gmail.com> Authored: Fri Jun 30 12:54:22 2017 -0600 Committer: Marko A. Rodriguez <okramma...@gmail.com> Committed: Fri Jun 30 12:54:22 2017 -0600 ---------------------------------------------------------------------- docs/src/reference/the-traversal.asciidoc | 9 +++++++++ 1 file changed, 9 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fb90f881/docs/src/reference/the-traversal.asciidoc ---------------------------------------------------------------------- diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc index 8af40df..3c52d5c 100644 --- a/docs/src/reference/the-traversal.asciidoc +++ b/docs/src/reference/the-traversal.asciidoc @@ -2617,6 +2617,15 @@ g.V().groupCount().by(label).order(local).by(values,decr) g.V().fold().sample(local,2) ---- +Finally, note that <<local-step,`local()`>>-step is a "hard-scoped step" that transforms any internal traversal into a +locally-scoped operation. A contrived example is provided below: + +[gremlin-groovy,modern] +---- +g.V().fold().local(unfold().count()) +g.V().fold().count(local) +---- + [[a-note-on-lambdas]] A Note On Lambdas -----------------