[
https://issues.apache.org/jira/browse/TINKERPOP3-760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14650474#comment-14650474
]
Marko A. Rodriguez commented on TINKERPOP3-760:
-----------------------------------------------
The problem with the {{as()}}-model is that the labels refers to two things --
the object in the step at that point AND the step itself. We have removed (I
believe completely) the use of {{as()}} as a reference to a step (only to the
path element generated by that step).
We could do something janky like this:
{code}
repeat('a', out().repeat('b', in().loops('a')))
{code}
...where the default [~dkuppitz] {{loops()}} is simply the current loop on the
stack.
> Make loop counter accessible within repeat()
> --------------------------------------------
>
> Key: TINKERPOP3-760
> URL: https://issues.apache.org/jira/browse/TINKERPOP3-760
> Project: TinkerPop 3
> Issue Type: Improvement
> Components: process
> Affects Versions: 3.0.0-incubating
> Reporter: Daniel Kuppitz
> Assignee: Daniel Kuppitz
> Fix For: 3.1.0-incubating
>
>
> Currently we can access the loop counter in a lambda:
> {code}
> .filter {it.loops() < 3}
> {code}
> Would be nice to have a step to access the counter:
> {code}
> .where(loops().is(lt(3)))
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)