Skip to content

Commit 2a277a7

Browse files
committed
spec zip-latest
1 parent 2f45ae5 commit 2a277a7

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

S17-concurrency.pod

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,20 @@ user-supplied function with the C<with> named parameter.
844844

845845
=back
846846

847-
[TODO: plenty more of these: combine_latest, while, until...]
847+
=item C<zip-latest>
848+
849+
my $z = $s1.zip-latest($s2); # like zip, defaults to :with( &[,] )
850+
851+
my $z = Supply.zip-latest(@s, :with( &[,] )); # also a method on Supply.
852+
853+
Produces a C<Supply> that will emit tuples of values as soon as any combined
854+
Supply produces a value. Before any tuples are emitted, all supplies have to
855+
have produced at least one value. By default, it uses C<< infix:<,> >> to
856+
produce the tuples, but the named parameter C<with> can override that.
857+
858+
=back
859+
860+
[TODO: plenty more of these: while, until...]
848861

849862
These combinators that involve multiple supplies need care in their
850863
implementation, since values may arrive at any point on each, and possibly at

0 commit comments

Comments
 (0)