Skip to content

Std\Parallel

Parallel map — applies f to each element concurrently. All invocations of f run in parallel. If any fails, the rest are cancelled and the error is propagated.

import pmap from Std\Parallel in
pmap (\x -> x * 2) [1, 2, 3] # => [2, 4, 6]

Parallel for-each — applies f to each element concurrently for side effects. Returns the number of elements processed.