Parallel list generators (hyper)
@results := map { .say; $_ * 2 }, @data;
# nothing output yet, map is lazy
@results := eager map { .say; $_ * 2 }, @data;
# eager evaluation forced
# each element of @data printed in sequence
continued...
| Perl 6 | Parallelism in Perl 6 | #25 |
@results := map { .say; $_ * 2 }, @data;
# nothing output yet, map is lazy
@results := eager map { .say; $_ * 2 }, @data;
# eager evaluation forced
# each element of @data printed in sequence
continued...
|
Copyright © 2013 http://www.pmichaud.com/2013/pres/ |