FSharp.Collections.Immutable 1.0.0

Edit this page

FlatList.Parallel Module

The functions of Parallel that take or return an optional value, with option instead of voption.

The other functions of the default module stay available after open FSharp.Collections.Immutable.Option. Each function has the signature of the function with the same name in Parallel.

Functions and values

Function or value Description

Parallel.choose chooser array

Full Usage: Parallel.choose chooser array

Parameters:
    chooser : 'T -> 'U option - The function that returns a value, or None to skip the element, called in parallel.
    array : FlatList<'T> - The input flat list.

Returns: FlatList<'U> The chosen values, in the order of their elements.

Returns the values that the chooser returns for the elements.

O(n).

chooser : 'T -> 'U option

The function that returns a value, or None to skip the element, called in parallel.

array : FlatList<'T>

The input flat list.

Returns: FlatList<'U>

The chosen values, in the order of their elements.

Parallel.tryFind predicate array

Full Usage: Parallel.tryFind predicate array

Parameters:
    predicate : 'T -> bool - The function to test the elements, called in parallel.
    array : FlatList<'T> - The input flat list.

Returns: 'T option The first element that satisfies the predicate, or None.

Returns the first element that satisfies the predicate, or None.

O(n). The predicate can also run for elements after the first one that satisfies it.

predicate : 'T -> bool

The function to test the elements, called in parallel.

array : FlatList<'T>

The input flat list.

Returns: 'T option

The first element that satisfies the predicate, or None.

Parallel.tryFindIndex predicate array

Full Usage: Parallel.tryFindIndex predicate array

Parameters:
    predicate : 'T -> bool - The function to test the elements, called in parallel.
    array : FlatList<'T> - The input flat list.

Returns: int option The index of the first element that satisfies the predicate, or None.

Returns the index of the first element that satisfies the predicate, or None.

O(n). The predicate can also run for elements after the first one that satisfies it.

predicate : 'T -> bool

The function to test the elements, called in parallel.

array : FlatList<'T>

The input flat list.

Returns: int option

The index of the first element that satisfies the predicate, or None.

Parallel.tryPick chooser array

Full Usage: Parallel.tryPick chooser array

Parameters:
    chooser : 'T -> 'U option - The function that returns a value, or None to go on, called in parallel.
    array : FlatList<'T> - The input flat list.

Returns: 'U option The value for the first element that the chooser returns a value for, or None.

Returns the first value that the chooser returns for the elements, or None.

O(n). The chooser can also run for elements after the first one that it returns a value for.

chooser : 'T -> 'U option

The function that returns a value, or None to go on, called in parallel.

array : FlatList<'T>

The input flat list.

Returns: 'U option

The value for the first element that the chooser returns a value for, or None.