Looking at Andrew Shitov's new "Using Perl6" book and was playing around
with his "94. Parallel file processing" and came up with the following (I
think nice) example.
# There is a thread to populate $dir-channel by reading filenames in a
directory with dir()
# and $N worker threads to read the
On Sun, 05 Feb 2017 13:22:13 -0800, jdv79 wrote:
> [jdv@new-host-2 ~]$ perl6 -e '(, ).values>>.elems.say'
> (2 3)
> [jdv@new-host-2 ~]$ perl6 -e '(, ).values>>.?elems.say'
> ((1 1) (1 1 1))
> [jdv@new-host-2 ~]$ perl6 -v
> This is Rakudo version 2017.01-170-gc0a907f built on MoarVM version
>
On Sun, 05 Feb 2017 13:22:13 -0800, jdv79 wrote:
> [jdv@new-host-2 ~]$ perl6 -e '(, ).values>>.elems.say'
> (2 3)
> [jdv@new-host-2 ~]$ perl6 -e '(, ).values>>.?elems.say'
> ((1 1) (1 1 1))
> [jdv@new-host-2 ~]$ perl6 -v
> This is Rakudo version 2017.01-170-gc0a907f built on MoarVM version
>
On Sat, Oct 28, 2017 at 1:58 PM, Simon Proctor
wrote:
> multi method ASSIGN-POS( $index, $new ) {
> @!arr[$index] = $new;
> }
>
This solves my problem with the first implementation, thank you for
pointing me to the ASSIGN-POS method.
Now