@@ -241,15 +241,15 @@ on to the C<Supply>. (for example, C<$supply.on-close(&on-close).map(*.uc)>).
241
241
When using a C < react > or C < supply > block, using the L < CLOSE|/language/phasers#CLOSE >
242
242
phaser is usually a better choice.
243
243
244
- my $s = Supplier.new;
245
- my $tap = $s.Supply.on-close({ say "Tap closed" }).tap(
246
- -> $v { say "the value is $v" },
247
- done => { say "Supply is done" },
248
- quit => -> $ex { say "Supply finished with error $ex" },
249
- );
244
+ my $s = Supplier.new;
245
+ my $tap = $s.Supply.on-close({ say "Tap closed" }).tap(
246
+ -> $v { say "the value is $v" },
247
+ done => { say "Supply is done" },
248
+ quit => -> $ex { say "Supply finished with error $ex" },
249
+ );
250
250
251
- $s.emit('Perl 6');
252
- $tap.close; # OUTPUT: «Tap closed»
251
+ $s.emit('Perl 6');
252
+ $tap.close; # OUTPUT: «Tap closed»
253
253
254
254
= head2 method interval
255
255
@@ -586,9 +586,9 @@ Use C<migrate> to join the values into a single supply again.
586
586
587
587
method migrate(Supply:D: --> Supply:D)
588
588
589
- Takes a Supply which itself has values that are of type Supply as input. Each
590
- time the outer Supply emits a new Supply, this will be tapped and its values
591
- emitted. Any previously tapped Supply will be closed. This is useful for migrating
589
+ Takes a C < Supply > which itself has values that are of type C < Supply > as input. Each
590
+ time the outer C < Supply > emits a new C < Supply > , this will be tapped and its values
591
+ emitted. Any previously tapped C < Supply > will be closed. This is useful for migrating
592
592
between different data sources, and only paying attention to the latest one.
593
593
594
594
For example, imagine an application where the user can switch between different
0 commit comments