{"issue":{"created_at":"2011-07-01T00:02:21Z","state":"open","updated_at":"2011-11-23T04:49:22Z","user":{"gravatar_id":"21c5aeda0e3c59037354ab55992e80c5","id":804467,"url":"https://api.github.com/users/espeed","login":"espeed","avatar_url":"https://secure.gravatar.com/avatar/21c5aeda0e3c59037354ab55992e80c5?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":2,"body":"Right now you can do something like this to return a tree of nested comments (for example):\r\n\r\n```groovy\r\ncomments = []\r\ng.v(1).in('comment_on').sideEffect{ x = [it]; comments << x; next = true }.in('comment_on').sideEffect{ if (next == true) {  nest = []; x << nest; next = false; } ; nest << it }.loop(4){it.loops < 1000} >> -1 \r\nreturn comments\r\n```\r\nIs there a better way? \r\n\r\nMarko mentioned that a \"'tree path'-based pipe\" might help to \"make this pretty\" (https://groups.google.com/d/topic/gremlin-users/XfwfrOQxlyw/discussion).","assignee":null,"id":1147683,"number":216,"labels":[{"name":"feature","color":"ededed","url":"https://api.github.com/repos/tinkerpop/gremlin/labels/feature"}],"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"title":"Support Tree Queries","closed_at":null,"html_url":"https://github.com/tinkerpop/gremlin/issues/216","milestone":null,"url":"https://api.github.com/repos/tinkerpop/gremlin/issues/216"},"action":"created","comment":{"created_at":"2011-11-23T04:49:22Z","updated_at":"2011-11-23T04:49:22Z","user":{"gravatar_id":"21c5aeda0e3c59037354ab55992e80c5","id":804467,"url":"https://api.github.com/users/espeed","login":"espeed","avatar_url":"https://secure.gravatar.com/avatar/21c5aeda0e3c59037354ab55992e80c5?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Here's a working Gremlin method https://gist.github.com/1197179","id":2844994,"url":"https://api.github.com/repos/tinkerpop/gremlin/issues/comments/2844994"}}