Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Spec Supply.lines/words
  • Loading branch information
lizmat committed Sep 17, 2014
1 parent 3a9b7a1 commit 075aec9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions S17-concurrency.pod
Expand Up @@ -780,6 +780,23 @@ have UI updates run on the UI thread.
Produces a C<Supply> that will C<more> each reduction from the given C<Supply>,
just like C<reduce> on C<List>s.

=item lines

my $l = $s.lines; # chomp lines
my $l = $s.lines( :!chomp ); # do *not* chomp lines

Produces a C<Supply> that will C<more> the characters coming in line by line
from a C<Supply> that usually created by some asynchronous I/O operation.
The optional C<:chomp> named parameter indicates whether to remove line
separators: the default is C<True>.

=item words

my $w = $s.words;

Produces a C<Supply> that will C<more> the characters coming in word by word
from a C<Supply> that usually created by some asynchronous I/O operation.

=item classify

my $c = $s.classify( {.WHAT} ); # one Supply per type of value
Expand Down

0 comments on commit 075aec9

Please sign in to comment.