Feeds
Feeds can be combined to form "pipelines"
@nums ==> grep { $_ % 2 } ==> sort ==> map { $_ ** 2 } ==> @oddsquares;
which is equivalent to
@oddsquares = map { $_ ** 2 }, sort grep { $_ % 2 } @nums;
Perl 6 | Parallelism in Perl 6 | #21 |
Feeds can be combined to form "pipelines"
@nums ==> grep { $_ % 2 } ==> sort ==> map { $_ ** 2 } ==> @oddsquares;
which is equivalent to
@oddsquares = map { $_ ** 2 }, sort grep { $_ % 2 } @nums;
Copyright © 2013 http://www.pmichaud.com/2013/pres/ |