-
-
Save Mouq/10d5b19f7869add9e9e0 to your computer and use it in GitHub Desktop.
Supply.categorize.done doesn't distribute .done to sub-supplies
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 $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