Luís Marques:
Is there a neat way to do this transformation with ranges and
std.algorithms?
Input:
-------
B foo
B bar
C ble
B big
A begga
Output: (aggregated and sorted on length)
-------
B -> [foo, bar, big]
C -> [ble]
A -> [begga]
What is the desired output data structure? An associative array
of dynamic arrays? Or is a dynamic arrays of dynamic arrays of
2-tuples enough?
There are various ways to solve your problem.
Related:
https://d.puremagic.com/issues/show_bug.cgi?id=5968
https://d.puremagic.com/issues/show_bug.cgi?id=9842
Bye,
bearophile