Step - sack

sack ยท category: Sack and side effects

Without arguments yields the traverser's sack value; with an Operator, by() feeds a value into the sack (see the book page Sack and Operators).

Forms

sack()
sack(arg1: any)

Example

g.with_sack(1).v(1).out().sack(Operator.sum).by(__.constant(2)).sack().to_list()   // [3, 3, 3]

See also