View Problem

Create a histogram map from a list

Given the list [a,b,a,c,b,b], produce a map {a:2, b:3, c:1} which contains the count of each unique item in the list
ExpandDiskEdit
erlang
% Imperative Solution
Histogram = histogram(List),
ExpandDiskEdit
erlang
% Functional (1) Solution
Histogram = histogram(List),

Submit a new solution for erlang
There are 17 other solutions in additional languages (cpp, csharp, fsharp, groovy ...)