Created
September 26, 2016 08:24
-
-
Save solson/5f6872e8e9b6315d76fe85c68b210894 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> my @sample = [{:directors($["Andrew Stanton", "Angus MacLane"])}, {:directors($["Greg Tiernan", "Conrad Vernon"])}, {:directors($["Byron Howard", "Rich Moore", "Jared Bush"])}] | |
[{directors => [Andrew Stanton Angus MacLane]} {directors => [Greg Tiernan Conrad Vernon]} {directors => [Byron Howard Rich Moore Jared Bush]}] | |
> printf "%-20s %s\n", .key, .value for Bag.new(@sample.map(|*<directors>)).sort({ -.value, .key }) | |
Andrew Stanton 1 | |
Angus MacLane 1 | |
Byron Howard 1 | |
Conrad Vernon 1 | |
Greg Tiernan 1 | |
Jared Bush 1 | |
Rich Moore 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment