hello,
> FWIW, I would make %section an HoA, which would be a less compact
> structure in memory, but allows more succinct manipulation, like so:
> my %section = lines()
> .map( *.split(",") )
> .classify( { .[0] }, :as{ .[1] } );
> for %section.sort {
> say .key;
> say "\t$_" for .value.sort.unique;
> }
then
* no need of %section
* no need to sort
so it becames:
fix () perl6 -e '
lines.map( *.split(",") )
.classify( { .[0] }, :as{ .[1] } )
.map: { say .key; say "\t$_" for .value.unique }
'
even if the semicolon thing goes on scratching me,
i'm really happy about this one! thanks a lot.
regards
marc