A Tap is a subscription to a Supply.
my $s = Supplier.new;
my $tap = $s.Supply.on-close({ say "Tap closed" }).tap(
-> $v { say "the value is $v" },
done => { say "Supply is done" },
quit => -> $ex { say "Supply finished with error $ex" },
);
$tap.close;
Closes the tap.
Type relations for Tap
Expand chart above