Hi,
> I've been experimenting with the possibility of examining the current path from within a loop's while closure, so that I can base a loop's continuation on portions of the path followed up to that point. There is a 'path' property available, which makes it possible to examine the current path from within the closure.
Yep. With Gremlin 2.x, be sure to set Pipeline.enablePath() as when path calls are in a closure, its impossible for the compiler to know that you want paths enabled. Path calculations are expensive and thus, assumed to be off. Note that when you do like paths(), simplePath(), etc., it knows you want paths enabled.
> I am wondering, is there a way to do something similar with a filter closure?
Huh. No, as you only have reference to 'it' which is the current object. ............................................................ could be possible, but would require some redos. You could do it with step() as step's 'it' is the previous pipe. it.getCurrentPath().
HTH,
Marko.
http://thinkaurelius.com