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. -- 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: notifications-unsubscr...@groovy.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org