You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Stephen Mallette (Jira)" <ji...@apache.org> on 2025/02/03 21:47:00 UTC
[jira] [Created] (TINKERPOP-3129) butLast step for collections
Stephen Mallette created TINKERPOP-3129:
-------------------------------------------
Summary: 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
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)