Skip to content

Instantly share code, notes, and snippets.

@okram
Created August 8, 2014 17:29
Show Gist options
  • Save okram/821f0fcded51ec20717e to your computer and use it in GitHub Desktop.
Save okram/821f0fcded51ec20717e to your computer and use it in GitHub Desktop.
gremlin> result = g.compute().program(LambdaVertexProgram.build().
gremlin> execute(new GSTriConsumer("a.property('counter', c.isInitialIteration() ? 1 : ++a.value('counter'))")).
gremlin> terminate(new GSPredicate('a.iteration > 9')).
gremlin> elementComputeKeys('counter',VARIABLE).create()).submit().get()
==>result[tinkergraph[vertices:6 edges:6],sideEffects[size:0]]
gremlin> result.graph.V.counter
==>10
==>10
==>10
==>10
==>10
==>10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment