📘 The list method in Perl 6 channels

📘 The list method in Raku channels

N. B. Perl 6 has been renamed to Raku. Click to read more.

The list method accompanies the previously seen methods and returns everything that is left unread in the channel.

my $c = Channel.new; 


say $c.list; # (5 6)

The method blocks the programme until the channel is open, thus it is wise to close it before calling the list method.

Leave a Reply

Your email address will not be published. Required fields are marked *