The .classify method
%addrbook.classify({ .value.substr(0,1).uc })
- .classify
- applies the block to each element
- returns a list of pairs where
- keys are the values returned from applying the block
- values are arrays of values that produced that key
Perl 6 | Cool Perl 6 | #24 |
%addrbook.classify({ .value.substr(0,1).uc })
Copyright © 2010 http://www.pmichaud.com/2010/pres/ |