Ok, here's what I have so far...
comments = []
g.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
return comments
However, Rexster returns this...
{"results":["[v[18], [v[30], v[21], v[24], v[27]]]"],"success":true,"version":"0.5-SNAPSHOT","queryTime":4.963128}
...notice that the value of the results list is a single string instead of list items.