fold
Aggregate all the returned objects into a list, then emit the list.
Synopsis
fold()
Description
The fold()
step is a map step.
It aggregates all the returned objects into a list, then emits the list into the next traversal step.
Examples
Get back a list of all the persons that each person knows:
g.V().hasLabel('person').out('knows').values('name').fold()