I was surprised to find that a Bag can’t convert to a dictionary - e.g.

Bag new 
        addAll: 'aabbbbcddd’; 
        asDictionary 

Gives an error - Dnu #key


It looks to me like Bag is inheriting a bad version of #associationsDo:  and 
instead could simply forward it to #doWithOccurences: instead?

I know Bag is not used that much - but it comes up a lot in programming 
exercises.

Tim

Reply via email to