FSharp.Collections.ParallelSeq


PSeq

Parallel operations on IEnumerables.

Functions and values

Function or valueDescription
append(source1 source2)
Signature: source1:seq<'T> -> source2:seq<'T> -> pseq<'T>
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Wraps the two given enumerations as a single concatenated enumeration.

Go to GitHub source
average(source)
Signature: source:seq<^T> -> ^T
Type parameters: ^T

Operates in parallel, using System.Linq.Parallel. Generates a new sequence which, when iterated, will return successive elements by calling the given function. The results of calling the function will not be saved, that is the function will be reapplied as necessary to regenerate the elements. The function is passed the index of the item being generated.

Go to GitHub source
averageBy(projection source)
Signature: projection:('T -> ^U) -> source:seq<'T> -> ^U
Type parameters: 'T, ^U

Operates in parallel, using System.Linq.Parallel. Returns the average of the results generated by applying the function to each element of the sequence.

Go to GitHub source
cast(source)
Signature: source:IEnumerable -> pseq<'T>
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Wraps a loosely-typed System.Collections sequence as a typed sequence.

Go to GitHub source
choose(chooser source)
Signature: chooser:('T -> 'U option) -> source:seq<'T> -> pseq<'U>
Type parameters: 'T, 'U

Operates in parallel, using System.Linq.Parallel. Applies the given function to each element of the list. Return the list comprised of the results "x" for each element where the function returns Some(x).

Go to GitHub source
collect(mapping source)
Signature: mapping:('T -> 'Collection) -> source:seq<'T> -> pseq<'U>
Type parameters: 'T, 'Collection, 'U

Operates in parallel, using System.Linq.Parallel. Applies the given function to each element of the sequence and concatenates all the results.

Go to GitHub source
concat(sources)
Signature: sources:seq<'Collection> -> pseq<'T>
Type parameters: 'Collection, 'T

Operates in parallel, using System.Linq.Parallel. Combines the given enumeration-of-enumerations as a single concatenated enumeration.

Go to GitHub source
countBy(projection source)
Signature: projection:('T -> 'Key) -> source:seq<'T> -> pseq<'Key * int>
Type parameters: 'T, 'Key

Operates in parallel, using System.Linq.Parallel. Applies a key-generating function to each element of a sequence and return a sequence yielding unique keys and their number of occurrences in the original sequence.

Go to GitHub source
distinct(source)
Signature: source:seq<'T> -> pseq<'T>
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Returns a sequence that contains no duplicate entries according to generic hash and equality comparisons on the entries. If an element occurs multiple times in the sequence then the later occurrences are discarded.

Go to GitHub source
distinctBy(projection source)
Signature: projection:('T -> 'Key) -> source:seq<'T> -> pseq<'T>
Type parameters: 'T, 'Key

Operates in parallel, using System.Linq.Parallel. Returns a sequence that contains no duplicate entries according to the generic hash and equality comparisons on the keys returned by the given key-generating function. If an element occurs multiple times in the sequence then the later occurrences are discarded.

Go to GitHub source
empty
Signature: pseq<'T>
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Creates an empty sequence.

Go to GitHub source
exists(predicate source)
Signature: predicate:('T -> bool) -> source:seq<'T> -> bool
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Tests if any element of the sequence satisfies the given predicate.

Go to GitHub source
exists2(predicate source1 source2)
Signature: predicate:('T1 -> 'T2 -> bool) -> source1:seq<'T1> -> source2:seq<'T2> -> bool
Type parameters: 'T1, 'T2

Operates in parallel, using System.Linq.Parallel. Tests if any pair of corresponding elements of the input sequences satisfies the given predicate.

Go to GitHub source
filter(predicate source)
Signature: predicate:('T -> bool) -> source:seq<'T> -> pseq<'T>
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Returns a new collection containing only the elements of the collection for which the given predicate returns "true".

Go to GitHub source
find(predicate source)
Signature: predicate:('T -> bool) -> source:seq<'T> -> 'T
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Returns the first element for which the given function returns true.

Go to GitHub source
findIndex(predicate source)
Signature: predicate:('T -> bool) -> source:seq<'T> -> int
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Returns the index of the first element for which the given function returns true.

Go to GitHub source
fold(folder state source)
Signature: folder:('State -> 'T -> 'State) -> state:'State -> source:seq<'T> -> 'State
Type parameters: 'T, 'State

Operates in parallel, using System.Linq.Parallel. Applies a function to each element of the collection, threading an accumulator argument through the computation. If the input function is f and the elements are i0...iN then computes f (... (f s i0)...) iN

Go to GitHub source
forall(predicate source)
Signature: predicate:('T -> bool) -> source:seq<'T> -> bool
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Tests if all elements of the sequence satisfy the given predicate.

Go to GitHub source
forall2(predicate source1 source2)
Signature: predicate:('T1 -> 'T2 -> bool) -> source1:seq<'T1> -> source2:seq<'T2> -> bool
Type parameters: 'T1, 'T2

Operates in parallel, using System.Linq.Parallel. Tests the all pairs of elements drawn from the two sequences satisfy the given predicate. If one sequence is shorter than the other then the remaining elements of the longer sequence are ignored.

Go to GitHub source
groupBy(projection source)
Signature: projection:('T -> 'Key) -> source:seq<'T> -> pseq<'Key * seq<'T>>
Type parameters: 'T, 'Key

Operates in parallel, using System.Linq.Parallel. Applies a key-generating function to each element of a sequence and yields a sequence of unique keys. Each unique key has also contains a sequence of all elements that match to this key.

Go to GitHub source
head(source)
Signature: source:seq<'T> -> 'T
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Returns the first element of the sequence.

Go to GitHub source
init(count initializer)
Signature: count:int -> initializer:(int -> 'T) -> pseq<'T>
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Generates a new sequence which, when iterated, will return successive elements by calling the given function, up to the given count. The results of calling the function will not be saved, that is the function will be reapplied as necessary to regenerate the elements. The function is passed the index of the item being generated.

Go to GitHub source
isEmpty(source)
Signature: source:seq<'T> -> bool
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Returns true if the sequence contains no elements, false otherwise.

Go to GitHub source
iter(action source)
Signature: action:('T -> unit) -> source:seq<'T> -> unit
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Applies the given function to each element of the collection.

Go to GitHub source
iter2(action source1 source2)
Signature: action:('T1 -> 'T2 -> unit) -> source1:seq<'T1> -> source2:seq<'T2> -> unit
Type parameters: 'T1, 'T2

Operates in parallel, using System.Linq.Parallel. Applies the given function to two collections simultaneously. If one sequence is shorter than the other then the remaining elements of the longer sequence are ignored.

Go to GitHub source
iteri(action source)
Signature: action:(int -> 'T -> unit) -> source:seq<'T> -> unit
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Applies the given function to each element of the collection. The integer passed to the function indicates the index of element.

Go to GitHub source
length(source)
Signature: source:seq<'T> -> int
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Returns the lengthof the sequence

Go to GitHub source
map(mapping source)
Signature: mapping:('T -> 'U) -> source:seq<'T> -> pseq<'U>
Type parameters: 'T, 'U

Operates in parallel, using System.Linq.Parallel. Builds a new collection whose elements are the results of applying the given function to each of the elements of the collection. The given function will be applied as elements are demanded using the MoveNext method on enumerators retrieved from the object.

Go to GitHub source
map2(mapping source1 source2)
Signature: mapping:('T1 -> 'T2 -> 'U) -> source1:seq<'T1> -> source2:seq<'T2> -> pseq<'U>
Type parameters: 'T1, 'T2, 'U

Operates in parallel, using System.Linq.Parallel. Builds a new collection whose elements are the results of applying the given function to the corresponding pairs of elements from the two sequences. If one input sequence is shorter than the other then the remaining elements of the longer sequence are ignored.

Go to GitHub source
mapi(mapping source)
Signature: mapping:(int -> 'T -> 'U) -> source:seq<'T> -> pseq<'U>
Type parameters: 'T, 'U

Operates in parallel, using System.Linq.Parallel. Builds a new collection whose elements are the results of applying the given function to each of the elements of the collection. The integer index passed to the function indicates the index (from 0) of element being transformed.

Go to GitHub source
max(source)
Signature: source:seq<^T> -> ^T
Type parameters: ^T

Operates in parallel, using System.Linq.Parallel. Returns a sequence of each element in the input sequence and its predecessor, with the exception of the first element which is only returned as the predecessor of the second element.

Go to GitHub source
maxBy(projection source)
Signature: projection:(^T -> ^U) -> source:seq<^T> -> ^T
Type parameters: ^T, ^U

Operates in parallel, using System.Linq.Parallel. Returns the greatest of all elements of the sequence, compared via Operators.max on the function result.

Go to GitHub source
min(source)
Signature: source:seq<^T> -> ^T
Type parameters: ^T

Operates in parallel, using System.Linq.Parallel. Like fold, but computes on-demand and returns the sequence of intermediary and final results.

Go to GitHub source
minBy(projection source)
Signature: projection:(^T -> ^U) -> source:seq<^T> -> ^T
Type parameters: ^T, ^U

Operates in parallel, using System.Linq.Parallel. Returns the lowest of all elements of the sequence, compared via Operators.min on the function result.

Go to GitHub source
nth(index source)
Signature: index:int -> source:seq<'T> -> 'T
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Computes the nth element in the collection.

Go to GitHub source
ofArray(source)
Signature: source:'T array -> pseq<'T>
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Views the given array as a sequence.

Go to GitHub source
ofList(source)
Signature: source:'T list -> pseq<'T>
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Views the given list as a sequence.

Go to GitHub source
ordered(source)
Signature: source:seq<'T> -> pseq<'T>
Type parameters: 'T
Go to GitHub source
pick(chooser source)
Signature: chooser:('T -> 'U option) -> source:seq<'T> -> 'U
Type parameters: 'T, 'U

Operates in parallel, using System.Linq.Parallel. Applies the given function to successive elements, returning the first x where the function returns "Some(x)".

Go to GitHub source
reduce(reduction source)
Signature: reduction:('T -> 'T -> 'T) -> source:seq<'T> -> 'T
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Applies a function to each element of the sequence, threading an accumulator argument through the computation. Begin by applying the function to the first two elements. Then feed this result into the function along with the third element and so on.
Return the final result.

Go to GitHub source
singleton(value)
Signature: value:'T -> pseq<'T>
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Returns a sequence that yields one item only.

Go to GitHub source
skip(count source)
Signature: count:int -> source:seq<'T> -> pseq<'T>
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Returns a sequence that skips N elements of the underlying sequence and then yields the remaining elements of the sequence.

Go to GitHub source
skipWhile(predicate source)
Signature: predicate:('T -> bool) -> source:seq<'T> -> pseq<'T>
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Returns a sequence that, when iterated, skips elements of the underlying sequence while the given predicate returns true, and then yields the remaining elements of the sequence.

Go to GitHub source
sort(source)
Signature: source:seq<'T> -> pseq<'T>
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Yields a sequence ordered by keys.

Go to GitHub source
sortBy(projection source)
Signature: projection:('T -> 'Key) -> source:seq<'T> -> pseq<'T>
Type parameters: 'T, 'Key

Operates in parallel, using System.Linq.Parallel. Applies a key-generating function to each element of a sequence and yield a sequence ordered by keys. The keys are compared using generic comparison as implemented by Operators.compare.

Go to GitHub source
sum(source)
Signature: source:seq<^T> -> ^T
Type parameters: ^T

Operates in parallel, using System.Linq.Parallel. Returns the first N elements of the sequence.

Go to GitHub source
sumBy(projection source)
Signature: projection:('T -> ^U) -> source:seq<'T> -> ^U
Type parameters: 'T, ^U

Operates in parallel, using System.Linq.Parallel. Returns the sum of the results generated by applying the function to each element of the sequence.

Go to GitHub source
takeWhile(predicate source)
Signature: predicate:('T -> bool) -> source:seq<'T> -> pseq<'T>
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Returns a sequence that, when iterated, yields elements of the underlying sequence while the given predicate returns true, and then returns no further elements.

Go to GitHub source
toArray(source)
Signature: source:seq<'T> -> 'T array
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Builds an array from the given collection.

Go to GitHub source
toList(source)
Signature: source:seq<'T> -> 'T list
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Builds a list from the given collection.

Go to GitHub source
truncate(count source)
Signature: count:int -> source:seq<'T> -> pseq<'T>
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Returns a sequence that when enumerated returns at most N elements.

Go to GitHub source
tryFind(predicate source)
Signature: predicate:('T -> bool) -> source:seq<'T> -> 'T option
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Returns the first element for which the given function returns true. Return None if no such element exists.

Go to GitHub source
tryFindIndex(predicate source)
Signature: predicate:('T -> bool) -> source:seq<'T> -> int option
Type parameters: 'T

Operates in parallel, using System.Linq.Parallel. Returns the index of the first element in the sequence that satisfies the given predicate. Return None if no such element exists.

Go to GitHub source
withCancellation(...)
Signature: cancellationToken:CancellationToken -> source:seq<'T> -> pseq<'T>
Type parameters: 'T
Go to GitHub source
withDegreeOfParallelism(n source)
Signature: n:int -> source:seq<'T> -> pseq<'T>
Type parameters: 'T
Go to GitHub source
withExecutionMode(executionMode source)
Signature: executionMode:ParallelExecutionMode -> source:seq<'T> -> pseq<'T>
Type parameters: 'T
Go to GitHub source
withMergeOptions(mergeOptions source)
Signature: mergeOptions:ParallelMergeOptions -> source:seq<'T> -> pseq<'T>
Type parameters: 'T
Go to GitHub source
zip(source1 source2)
Signature: source1:seq<'T1> -> source2:seq<'T2> -> pseq<'T1 * 'T2>
Type parameters: 'T1, 'T2

Operates in parallel, using System.Linq.Parallel. Combines the two sequences into a list of pairs. The two sequences need not have equal lengths: when one sequence is exhausted any remaining elements in the other sequence are ignored.

Go to GitHub source
F# Project
Fork me on GitHub