Cool Perl 6: Hash sort by value
Explanation: Start with the long form
sub value_cmp -> $a, $b { $a.value cmp $b.value }; %scores.sort( &value_cmp );continued...
Perl 6 | Cool Perl 6 | #52 |
Explanation: Start with the long form
sub value_cmp -> $a, $b { $a.value cmp $b.value }; %scores.sort( &value_cmp );continued...
Copyright © 2010 http://www.pmichaud.com/2010/pres/ |