Gremlin queries often work with or produce lists. Sometimes it is desirable to be able to reverse a list. Currently Gremlin does not have a reverse
step so you cannot do something like:
g.inject(['A','B','C','D']).reverse()
Nor is there a reverse
option for order
so you cannot do something like
g.inject(['A','B','C','D']).order(local).by(reverse)
Is there a way to reverse a list in Gremlin today without having to fall back on using closures?