Skip to content

Instantly share code, notes, and snippets.

@colomon
Created April 17, 2014 11:46
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 colomon/10976822 to your computer and use it in GitHub Desktop.
Save colomon/10976822 to your computer and use it in GitHub Desktop.
# Produce a word counts hash per file - totally unshared!
my @all_counts = await do for @*ARGS -> $filename {
start {
slurp($filename).words.Bag
}
}
# Bring them together into a single result.
my %totals := [(+)] @all_counts;
say %totals.elems;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment