[ 
https://issues.apache.org/jira/browse/GROOVY-11253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul King closed GROOVY-11253.
------------------------------

> Identity variants for DGM#countBy
> ---------------------------------
>
>                 Key: GROOVY-11253
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11253
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: Paul King
>            Assignee: Paul King
>            Priority: Major
>             Fix For: 5.0.0-alpha-4
>
>
> We haven't added such functionality in the past since it was thought to be 
> more of a niche use case than groupBy (where we do provide it). But given 
> this is the closest Groovy has to creating a multiset/bag, it is probably 
> worth having as a shortcut - rather than requiring an explicit 
> Closure.IDENTITY.
> Whether Groovy should have specialised multiset and multimap classes is 
> another question for another issue. We could use ".toMultiset()" to return a 
> more specialised multiset return type in that case, so we aren't making it 
> harder with this PR to add such functionality later if we wanted.



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

Reply via email to