[ 
https://issues.apache.org/jira/browse/GROOVY-11606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17943864#comment-17943864
 ] 

ASF GitHub Bot commented on GROOVY-11606:
-----------------------------------------

paulk-asert commented on PR #2182:
URL: https://github.com/apache/groovy/pull/2182#issuecomment-2799053479

   The Smalltalk semantics for "collect" is transform. Think: I have an 
aggregate of People and I'll produce an aggregate of Names by "collect"ing each 
person's name. The "into a collection" is definitely true when we supply a 
collector but isn't a required interpretation when the incoming aggregate isn't 
a collection. Currently though, if the incoming aggregate is Set or array, we 
produce List as the output aggregate (though collectNested preserves the Set). 
The collect using the identity transform is a bit of an anomaly. Having some 
"map" variants certainly let's us not break compatibility if we don't mind the 
extra variants. 




> Lazy findAll, collect, collectMany
> ----------------------------------
>
>                 Key: GROOVY-11606
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11606
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: Paul King
>            Assignee: Paul King
>            Priority: Major
>
> See:
> https://lists.apache.org/thread/xv1bpgc7xp3rwp7qt627xfyd10ljcwbc



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to