Meta operators (I)
- One place infinite lazy lists do not work are the hyper meta operators
- The idea is that conceptually they work on the entire list at once
- Indeed, they are allowed to work on its elements in any order, and in parallel
- (In practice, none of the Perl 6 compilers handle parallel processing yet)
- Our first example of a meta operator: an operator built from a simpler operator
-
@a »+« @b
produces an array which is the sum of the other two arrays
-
@a »%%» 2
produces an array of Bools telling which elements of @a
are divisible by 2
-
~«@a
is effectively the same as @a».Str
-- it returns an array of strings
« first
< prev
(34 / 41)
next >
last »