Skip to content

Instantly share code, notes, and snippets.

@dkuppitz
dkuppitz / trees.groovy
Last active December 15, 2015 15:19 — forked from espeed/trees.groovy
// Gremlin user-defined defined tree steps
// inTree() and outTree()
// by James Thornton, http://jamesthornton.com
// added ability to sort subtrees
// see https://groups.google.com/d/topic/gremlin-users/iCPUifiU_wk/discussion
// closure can't have the same name as the defined step
tree = { vertices ->