Documentation for method race

Documentation for method race, assembled from the following types:

role Iterable

From Iterable

(Iterable) method race

Defined as:

method race(Int(Cool:$batch = 64Int(Cool:$degree = 4 --> Iterable)

NOTE: currently, this method is experimental

Returns another Iterable that is potentially iterated in parallel, with a given batch size and degree of parallelism (number of parallel workers).

Unlike hyper, race does not preserve the order of elements.

say ([1..100].race.map({ $_ +1 }).list);