After open FSharp.Collections.Immutable.Option, these functions shadow the default ones, and the other functions
of the default module stay available (ADR 0001, D3). Each function has the signature of the function with the same
name in Array where that module has one.
| Modules | Description |
| Function or value | Description | ||
|
|||
Full Usage:
FlatList.pick chooser array
Parameters:
'T -> 'U option
-
The function that returns a value, or None to go on.
array : FlatList<'T>
-
The input flat list.
Returns: 'U
The first chosen value.
|
O(n).
|
||
Full Usage:
FlatList.tryExactlyOne array
Parameters:
FlatList<'T>
-
The input flat list.
Returns: 'T option
The only element, or None.
|
|||
Full Usage:
FlatList.tryFind predicate array
Parameters:
'T -> bool
-
The function to test the elements.
array : FlatList<'T>
-
The input flat list.
Returns: 'T option
The first element that satisfies the predicate, or None.
|
O(n).
|
||
Full Usage:
FlatList.tryFindBack predicate array
Parameters:
'T -> bool
-
The function to test the elements.
array : FlatList<'T>
-
The input flat list.
Returns: 'T option
The last element that satisfies the predicate, or None.
|
O(n).
|
||
Full Usage:
FlatList.tryFindIndex predicate array
Parameters:
'T -> bool
-
The function to test the elements.
array : FlatList<'T>
-
The input flat list.
Returns: int option
The index of the first element that satisfies the predicate, or None.
|
O(n).
|
||
Full Usage:
FlatList.tryFindIndexBack predicate array
Parameters:
'T -> bool
-
The function to test the elements.
array : FlatList<'T>
-
The input flat list.
Returns: int option
The index of the last element that satisfies the predicate, or None.
|
O(n).
|
||
Full Usage:
FlatList.tryHead array
Parameters:
FlatList<'T>
-
The input flat list.
Returns: 'T option
The first element, or None.
|
|||
Full Usage:
FlatList.tryItem index array
Parameters:
int
-
The index of the element.
array : FlatList<'T>
-
The input flat list.
Returns: 'T option
The element at the index, or None.
|
O(1).
|
||
Full Usage:
FlatList.tryLast array
Parameters:
FlatList<'T>
-
The input flat list.
Returns: 'T option
The last element, or None.
|
|||
Full Usage:
FlatList.tryPick chooser array
Parameters:
'T -> 'U option
-
The function that returns a value, or None to go on.
array : FlatList<'T>
-
The input flat list.
Returns: 'U option
The first chosen value, or None.
|
O(n).
|
||
|
|||
Full Usage:
FlatList.unfold generator state
Parameters:
'State -> ('T * 'State) option
-
The function that returns the next element and state, or None to stop.
state : 'State
-
The initial state.
Returns: FlatList<'T>
The generated flat list.
|
O(n).
|