Skip to content

Instantly share code, notes, and snippets.

@okram
Created July 17, 2014 15:01
Show Gist options
  • Save okram/0cb66fc9c2c35eef5f1f to your computer and use it in GitHub Desktop.
Save okram/0cb66fc9c2c35eef5f1f to your computer and use it in GitHub Desktop.
GREMLIN 3
gremlin> g.v(1).as('x').out.jump('x'){println it.loops + " " + it.get();it.loops < 4}
1 v[3]
1 v[2]
1 v[4]
2 v[5]
2 v[3]
GREMLIN 2
gremlin> g.v(1).as('x').out.loop('x'){println it.loops + " " + it.object;it.loops < 4}
2 v[2]
2 v[4]
2 v[3]
3 v[5]
3 v[3]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment