Documentation for method
tap assembled from the following types:
method tap(Supply: = -> $ ,:,:,--> Tap)
Creates a new tap (a kind of subscription if you will), in addition to all existing taps. The first positional argument is a piece of code that will be called when a new value becomes available through the
&done callback can be called in a number of cases: if a supply block is being tapped, when a
done routine is reached; if a supply block is being tapped, it will be automatically triggered if the supply block reaches the end; if the
done method is called on the parent
Supplier (in the case of a supply block, if there are multiple Suppliers referenced by
whenever, they must all have their
done method invoked for this to trigger the
&done callback of the tap as the block will then reach its end).
&quit callback is called if the tap is on a supply block which exits with an error. It is also called if the
quit method is invoked on the parent
Supplier (in the case of a supply block any one
Supplier quitting with an uncaught exception will call the
&quit callback as the block will exit with an error).
tap returns an object of type Tap, on which you can call the
close method to cancel the subscription.
my = Supply.from-list(0 .. 5);my = .tap(-> , done => );
012345no more ticks