[
https://issues.apache.org/jira/browse/TINKERPOP-2667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17459418#comment-17459418
]
ASF GitHub Bot commented on TINKERPOP-2667:
-------------------------------------------
spmallette opened a new pull request #1517:
URL: https://github.com/apache/tinkerpop/pull/1517
https://issues.apache.org/jira/browse/TINKERPOP-2667
The following works now:
```text
gremlin> g.inject([a: 1],[b:2]).fold([], addAll)
==>[[a:1],[b:2]]
gremlin> g.inject([a: 1],[b:2]).fold([:], addAll)
==>[a:1,b:2]
```
Interestingly, this functionality used to result in an exception so it
really isn't a change in behavior which means it could slip in on 3.5-dev.
VOTE +1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
> Allow fold() with addAll to work on Map
> ---------------------------------------
>
> Key: TINKERPOP-2667
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2667
> Project: TinkerPop
> Issue Type: Improvement
> Components: process
> Affects Versions: 3.5.1
> Reporter: Stephen Mallette
> Assignee: Stephen Mallette
> Priority: Major
>
> The following bit of Gremlin should work as a method for merging {{Map}}:
> {code}
> gremlin> g.inject([a: 1],[b:2]).fold([:], addAll)
> ==>[a:1,b:2]
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)