Skip to content

Instantly share code, notes, and snippets.

@Mouq
Created January 25, 2015 22:07
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 Mouq/10d5b19f7869add9e9e0 to your computer and use it in GitHub Desktop.
Save Mouq/10d5b19f7869add9e9e0 to your computer and use it in GitHub Desktop.
Supply.categorize.done doesn't distribute .done to sub-supplies
my $s = Supply.new;
$s.tap: {
say "Outer got ",$_;
}, :done{ say "Outer done" }
$s.categorize({.round}).tap: -> $pair (:$key, :$value){
say "Categorize produced ", $pair;
$value.tap: {
say "Key $key got value ", $_;
}, :done{ say "Supply for key $key done" }
}, :done{ say "Categorize done" }
$s.emit($_) for 1.2, 4, 2, 0.9, 3.7, 2.3;
$s.done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment