[ https://issues.apache.org/jira/browse/TINKERPOP-3129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephen Mallette updated TINKERPOP-3129: ---------------------------------------- Description: Gremlin has several pattern for getting all elements in the stream except for the last one. Here's one way to do it: {code} fold().sideEffect(tail(local).store('t')). unfold().where(neq('t')).by().by(unfold()) {code} The set of collection manipulation steps would benefit from an easier way to do this. was: Gremlin has several pattern for getting all elements in the stream except for the last one. Here's one way to do it: {{code}} fold().sideEffect(tail(local).store('t')). unfold().where(neq('t')).by().by(unfold()) {{code}} The set of collection manipulation steps would benefit from an easier way to do this. > butLast step for collections > ---------------------------- > > Key: TINKERPOP-3129 > URL: https://issues.apache.org/jira/browse/TINKERPOP-3129 > Project: TinkerPop > Issue Type: Improvement > Components: language, process > Affects Versions: 3.7.3 > Reporter: Stephen Mallette > Priority: Major > > Gremlin has several pattern for getting all elements in the stream except for > the last one. Here's one way to do it: > {code} > fold().sideEffect(tail(local).store('t')). > unfold().where(neq('t')).by().by(unfold()) > {code} > The set of collection manipulation steps would benefit from an easier way to > do this. -- This message was sent by Atlassian Jira (v8.20.10#820010)