View Problem

Categorise a list

Given the list [one, two, three, four, five] produce a map {3:[one, two], 4:[four, five], 5:[three]} which sorts elements into map entries based on their length
ExpandDiskEdit
erlang
% Imperative Solution
CatList = categorise(List),
ExpandDiskEdit
erlang
% Functional (1) Solution
CatList = categorise(List),

Submit a new solution for erlang
There are 23 other solutions in additional languages (clojure, cpp, csharp, fantom ...)