Hi all,
I thought I remembered there was a method in the api somewhere that
would count the frequency of each unique item in a collection, but I
can't find it anymore. What would be a brief way to write that in
clojure?
(In ruby: array.inject(Hash.new(0)) {|hash,key| hash[key] += 1 ;
hash})
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---