Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Allow argless tap.
Useful for tapping for (do) side-effects.
  • Loading branch information
jnthn committed Apr 21, 2014
1 parent bc7efa3 commit be57b26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Supply.pm
Expand Up @@ -19,7 +19,7 @@ my role Supply {
has @!tappers;
has $!tappers_lock = Lock.new;

method tap(&more, :&done, :&quit = {.die}, :&on_close) {
method tap(&more = -> $ { }, :&done, :&quit = {.die}, :&on_close) {
my $sub = Tap.new(:&more, :&done, :&quit, :&on_close, :supply(self));
$!tappers_lock.protect({
@!tappers.push($sub);
Expand Down

0 comments on commit be57b26

Please sign in to comment.