FSharp.PowerPack.Parallel.Seq
Operates in parallel, using System.Linq.Parallel. Returns the average of the results generated by applying the function to each element
of the sequence.
The elements are averaged using the + operator, DivideByInt method and Zero property
associated with the generated type.
A function applied to transform each element of the sequence.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Thrown when the input sequence has zero elements.
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.
The returned sequence may be passed between threads safely. However,
individual IEnumerator values generated from the returned sequence should not be accessed concurrently.
Iteration can continue up to Int32.MaxValue.
A function that generates an item in the sequence from a given index.
The result sequence.
Operates in parallel, using System.Linq.Parallel. Returns a sequence that is built from the given delayed specification of a
sequence.
The input function is evaluated each time an IEnumerator for the sequence
is requested.
The generating function for the sequence.
Operates in parallel, using System.Linq.Parallel. Compares two sequences using the given comparison function, element by element.
Returns the first non-zero result from the comparison function. If the end of a sequence
is reached it returns a -1 if the first sequence is shorter and a 1 if the second sequence
is shorter.
A function that takes an element from each sequence and returns an int.
If it evaluates to a non-zero value iteration is stopped and that value is returned.
The first input sequence.
The second input sequence.
The result sequence.
Thrown when either of the input sequences
is null.
Operates in parallel, using System.Linq.Parallel. Returns a sequence that corresponds to a cached version of the input sequence.
This result sequence will have the same elements as the input sequence. The result
can be enumerated multiple times. The input sequence will be enumerated at most
once and only as far as is necessary. Caching a sequence is typically useful when repeatedly
evaluating items in the original sequence is computationally expensive or if
iterating the sequence causes side-effects that the user does not want to be
repeated multiple times.
Enumeration of the result sequence is thread safe in the sense that multiple independent IEnumerator
values may be used simultaneously from different threads (accesses to
the internal lookaside table are thread safe). Each individual IEnumerator
is not typically thread safe and should not be accessed concurrently.
Once enumeration of the input sequence has started,
it's enumerator will be kept live by this object until the enumeration has completed.
At that point, the enumerator will be disposed.
The enumerator may be disposed and underlying cache storage released by
converting the returned sequence object to type IDisposable, and calling the Dispose method
on this object. The sequence object may then be re-enumerated and a fresh enumerator will
be used.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Operates in parallel, using System.Linq.Parallel. Returns the average of the elements in the sequence.
The elements are averaged using the + operator, DivideByInt method and Zero property
associated with the element type.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Thrown when the input sequence has zero elements.
Operates in parallel, using System.Linq.Parallel. Returns the greatest of all elements of the sequence, compared via Operators.max on the function result.
A function to transform items from the input sequence into comparable keys.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Thrown when the input sequence is empty.
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.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Operates in parallel, using System.Linq.Parallel. Returns the greatest of all elements of the sequence, compared via Operators.max
The input sequence.
Thrown when the input sequence is null.
Thrown when the input sequence is empty.
The result sequence.
Operates in parallel, using System.Linq.Parallel. Returns the lowest of all elements of the sequence, compared via Operators.min on the function result.
A function to transform items from the input sequence into comparable keys.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Thrown when the input sequence is empty.
Operates in parallel, using System.Linq.Parallel. Like fold, but computes on-demand and returns the sequence of intermediary and final results.
A function that updates the state with each element from the sequence.
The initial state.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Operates in parallel, using System.Linq.Parallel. Builds a new sequence object that delegates to the given sequence object. This ensures
the original sequence cannot be rediscovered and mutated by a type cast. For example,
if given an array the returned sequence will return the elements of the array, but
you cannot cast the returned sequence object to an array.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Operates in parallel, using System.Linq.Parallel. Returns the lowest of all elements of the sequence, compared via Operators.min.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Thrown when the input sequence is empty.
Operates in parallel, using System.Linq.Parallel. Returns the sum of the results generated by applying the function to each element of the sequence.
The generated elements are summed using the + operator and Zero property associated with the generated type.
A function to transform items from the input sequence into the type that will be summed.
The input sequence.
The result sequence.
Operates in parallel, using System.Linq.Parallel. Returns the first N elements of the sequence.
Throws InvalidOperationException
if the count exceeds the number of elements in the sequence. Seq.truncate
returns as many items as the sequence contains instead of throwing an exception.
The number of items to take.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Thrown when the input sequence is empty.
Thrown when count exceeds the number of elements
in the sequence.
Operates in parallel, using System.Linq.Parallel. Applies the given function to successive elements, returning the first
result where the function returns "Some(x)".
A function that transforms items from the input sequence into options.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Operates in parallel, using System.Linq.Parallel. Returns a sequence that contains the elements generated by the given computation.
The given initial state argument is passed to the element generator.
For each IEnumerator elements in the stream are generated on-demand by applying the element
generator, until a None value is returned by the element generator. Each call to the element
generator returns a new residual state.
The stream will be recomputed each time an IEnumerator is requested and iterated for the Seq.
The returned sequence may be passed between threads safely. However,
individual IEnumerator values generated from the returned sequence should not be accessed concurrently.
A function that takes in the current state and returns an option tuple of the next
element of the sequence and the next state value.
The initial state value.
The result sequence.
Operates in parallel, using System.Linq.Parallel. Returns a sequence that yields sliding windows of containing elements drawn from the input
sequence. Each window is returned as a fresh array.
The number of elements in each window.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Thrown when the input sequence is empty.
Operates in parallel, using System.Linq.Parallel. Combines the three sequences into a list of triples. The sequences need not have equal lengths:
when one sequence is exhausted any remaining elements in the other
sequences are ignored.
The first input sequence.
The second input sequence.
The third input sequence.
The result sequence.
Thrown when any of the input sequences is null.
Operates in parallel, using System.Linq.Parallel. Returns the sum of the elements in the sequence.
The elements are summed using the + operator and Zero property associated with the generated type.
The input sequence.
The result sequence.
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.
The first input sequence.
The second input sequence.
The result sequence.
Thrown when either of the input sequences is null.
Operates in parallel, using System.Linq.Parallel. Returns a sequence that when enumerated returns at most N elements.
The maximum number of items to enumerate.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
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.
A function that evaluates to a Boolean when given an item in the sequence.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
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.
A function that evaluates to a Boolean when given an item in the sequence.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Operates in parallel, using System.Linq.Parallel. Builds a list from the given collection.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Operates in parallel, using System.Linq.Parallel. Builds an array from the given collection.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
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.
A function that evaluates to false when no more items should be returned.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
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.
This function returns a sequence that digests the whole initial sequence as soon as
that sequence is iterated. As a result this function should not be used with
large or infinite sequences. The function makes no assumption on the ordering of the original
sequence.
This is a stable sort, that is the original order of equal elements is preserved.
A function to transform items of the input sequence into comparable keys.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Operates in parallel, using System.Linq.Parallel. Yields a sequence ordered by keys.
This function returns a sequence that digests the whole initial sequence as soon as
that sequence is iterated. As a result this function should not be used with
large or infinite sequences. The function makes no assumption on the ordering of the original
sequence.
This is a stable sort, that is the original order of equal elements is preserved.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
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.
A function that evaluates an element of the sequence to a boolean value.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
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.
The number of items to skip.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Thrown when count exceeds the number of elements
in the sequence.
Operates in parallel, using System.Linq.Parallel. Returns a sequence that yields one item only.
The input item.
The result sequence.
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.
A function that takes in the current accumulated result and the next
element of the sequence to produce the next accumulated result.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Thrown when the input sequence is empty.
Operates in parallel, using System.Linq.Parallel. Applies the given function to successive elements, returning the first
x where the function returns "Some(x)".
A function to transform each item of the input sequence into an option of the output type.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Thrown when every item of the sequence
evaluates to None when the given function is applied.
Operates in parallel, using System.Linq.Parallel. Views the given list as a sequence.
The input list.
The result sequence.
Operates in parallel, using System.Linq.Parallel. Views the given array as a sequence.
The input array.
The result sequence.
Thrown when the input sequence is null.
Operates in parallel, using System.Linq.Parallel. Computes the nth element in the collection.
The index of element to retrieve.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
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.
A function to transform items from the input sequence that also supplies the current index.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
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.
A function to transform pairs of items from the input sequences.
The first input sequence.
The second input sequence.
The result sequence.
Thrown when either of the input sequences is null.
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.
The returned sequence may be passed between threads safely. However,
individual IEnumerator values generated from the returned sequence should not be accessed concurrently.
A function to transform items from the input sequence.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Operates in parallel, using System.Linq.Parallel. Returns the lengthof the sequence
The input sequence.
The result sequence.
Thrown when the input sequence is null.
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.
A function to apply to each pair of elements from the input sequences.
The first input sequence.
The second input sequence.
The result sequence.
Thrown when either of the input sequences is null.
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.
A function to apply to each element of the sequence that can also access the current index.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Operates in parallel, using System.Linq.Parallel. Applies the given function to each element of the collection.
A function to apply to each element of the sequence.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
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.
The returned sequence may be passed between threads safely. However,
individual IEnumerator values generated from the returned sequence should not be accessed concurrently.
The maximum number of items to generate for the sequence.
A function that generates an item in the sequence from a given index.
The result sequence.
Thrown when count is negative.
Operates in parallel, using System.Linq.Parallel. Returns true if the sequence contains no elements, false otherwise.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Operates in parallel, using System.Linq.Parallel. Returns the first element of the sequence.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Thrown when the input does not have any elements.
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.
This function returns a sequence that digests the whole initial sequence as soon as
that sequence is iterated. As a result this function should not be used with
large or infinite sequences. The function makes no assumption on the ordering of the original
sequence.
A function that transforms an element of the sequence into a comparable key.
The input sequence.
The result sequence.
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.
A function to test pairs of elements from the input sequences.
The first input sequence.
The second input sequence.
The result sequence.
Thrown when either of the input sequences is null.
Operates in parallel, using System.Linq.Parallel. Tests if all elements of the sequence satisfy the given predicate.
The predicate is applied to the elements of the input sequence. If any application
returns false then the overall result is false and no further elements are tested.
Otherwise, true is returned.
A function to test an element of the input sequence.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
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
A function that updates the state with each element from the sequence.
The initial state.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Operates in parallel, using System.Linq.Parallel. Returns the index of the first element for which the given function returns true.
A function to test whether the index of a particular element should be returned.
The input sequence.
The result sequence.
Thrown if no element returns true when
evaluated by the predicate
Thrown when the input sequence is null
Operates in parallel, using System.Linq.Parallel. Returns the first element for which the given function returns true.
A function to test whether an item in the sequence should be returned.
The input sequence.
The result sequence.
Thrown if no element returns true when
evaluated by the predicate
Thrown when the input sequence is null
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".
The returned sequence may be passed between threads safely. However,
individual IEnumerator values generated from the returned sequence should not be accessed concurrently.
Remember sequence is lazy, effects are delayed until it is enumerated.
A function to test whether each item in the input sequence should be included in the output.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Operates in parallel, using System.Linq.Parallel. Tests if any pair of corresponding elements of the input sequences satisfies the given predicate.
The predicate is applied to matching elements in the two sequences up to the lesser of the
two lengths of the collections. If any application returns true then the overall result is
true and no further elements are tested. Otherwise, false is returned. If one sequence is shorter than
the other then the remaining elements of the longer sequence are ignored.
A function to test each pair of items from the input sequences.
The first input sequence.
The second input sequence.
The result sequence.
Thrown when either of the two input sequences is null.
Operates in parallel, using System.Linq.Parallel. Tests if any element of the sequence satisfies the given predicate.
The predicate is applied to the elements of the input sequence. If any application
returns true then the overall result is true and no further elements are tested.
Otherwise, false is returned.
A function to test each item of the input sequence.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Operates in parallel, using System.Linq.Parallel. Creates an empty sequence.
The result sequence.
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.
A function transforming the sequence items into comparable keys.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
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.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
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.
Note that this function returns a sequence that digests the whole initial sequence as soon as
that sequence is iterated. As a result this function should not be used with
large or infinite sequences. The function makes no assumption on the ordering of the original
sequence.
A function transforming each item of input sequence into a key to be
compared against the others.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Operates in parallel, using System.Linq.Parallel. Combines the given enumeration-of-enumerations as a single concatenated
enumeration.
The returned sequence may be passed between threads safely. However,
individual IEnumerator values generated from the returned sequence should not be accessed concurrently.
The input enumeration-of-enumerations.
The result sequence.
Thrown when the input sequence is null.
Operates in parallel, using System.Linq.Parallel. Applies the given function to each element of the sequence and concatenates all the
results.
Remember sequence is lazy, effects are delayed until it is enumerated.
A function to transform elements of the input sequence into the sequences
that will then be concatenated.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
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).
The returned sequence may be passed between threads safely. However,
individual IEnumerator values generated from the returned sequence should not
be accessed concurrently.
A function to transform items of type T into options of type U.
The input sequence of type T.
The result sequence.
Thrown when the input sequence is null.
Operates in parallel, using System.Linq.Parallel. Wraps a loosely-typed System.Collections sequence as a typed sequence.
The use of this function usually requires a type annotation.
An incorrect type annotation may result in runtime type
errors.
Individual IEnumerator values generated from the returned sequence should not be accessed concurrently.
The input sequence.
The result sequence.
Thrown when the input sequence is null.
Operates in parallel, using System.Linq.Parallel. Wraps the two given enumerations as a single concatenated
enumeration.
The returned sequence may be passed between threads safely. However,
individual IEnumerator values generated from the returned sequence should not be accessed
concurrently.
The first sequence.
The second sequence.
The result sequence.
Thrown when either of the two provided sequences is
null.
Parallel operations on IEnumerables.