Skip to content

Instantly share code, notes, and snippets.

@gfldex
Forked from samcv/test2.p6
Created January 31, 2017 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gfldex/006d385aa45969b8487b27b5727cda17 to your computer and use it in GitHub Desktop.
Save gfldex/006d385aa45969b8487b27b5727cda17 to your computer and use it in GitHub Desktop.
my %results;
for ^10 {
%results{$_}<bytes> = (1..10).pick;
}
say %results.perl;
say %results.keys.sort({
my $c = %results{$^a}<bytes> cmp %results{$^b}<bytes>;
$c ?? $c !! $^a.Int cmp $^b.Int;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment