Header menu logo FSharp.Control.AsyncSeq

AsyncSeq Module

Types

Type Description

AsyncSeqBuilder

Computation builder that allows creating of asynchronous sequences using the 'asyncSeq { ... }' syntax

Functions and values

Function or value Description

AsyncSeq.allPairs source1 source2

Full Usage: AsyncSeq.allPairs source1 source2

Parameters:
Returns: AsyncSeq<'T1 * 'T2>

Returns an async sequence of all pairs of elements from the two input sequences. The second sequence is fully buffered before iteration begins, mirroring Seq.allPairs.

source1 : AsyncSeq<'T1>
source2 : AsyncSeq<'T2>
Returns: AsyncSeq<'T1 * 'T2>

AsyncSeq.append seq1 seq2

Full Usage: AsyncSeq.append seq1 seq2

Parameters:
Returns: AsyncSeq<'T>

Yields all elements of the first asynchronous sequence and then all elements of the second asynchronous sequence.

seq1 : AsyncSeq<'T>
seq2 : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.appendSeq seq2 source

Full Usage: AsyncSeq.appendSeq seq2 source

Parameters:
Returns: AsyncSeq<'T>

Yields all elements of the source asynchronous sequence and then all elements of the synchronous sequence appended at the end.

seq2 : 'T seq
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.average source

Full Usage: AsyncSeq.average source

Parameters:
Returns: Async<^T>
Modifiers: inline
Type parameters: ^T

Asynchronously compute the average of the elements of the input asynchronous sequence. Raises InvalidArgumentException if the sequence is empty.

source : AsyncSeq<^T>
Returns: Async<^T>

AsyncSeq.averageBy projection source

Full Usage: AsyncSeq.averageBy projection source

Parameters:
    projection : 'T -> ^U
    source : AsyncSeq<'T>

Returns: Async<^U>
Modifiers: inline
Type parameters: 'T, ^U

Asynchronously compute the average of the mapped elements of an asynchronous sequence using a synchronous projection. Raises InvalidArgumentException if the sequence is empty.

projection : 'T -> ^U
source : AsyncSeq<'T>
Returns: Async<^U>

AsyncSeq.averageByAsync projection source

Full Usage: AsyncSeq.averageByAsync projection source

Parameters:
Returns: Async<^U>
Modifiers: inline
Type parameters: 'T, ^U

Asynchronously compute the average of the mapped elements of an asynchronous sequence using an asynchronous projection. Raises InvalidArgumentException if the sequence is empty.

projection : 'T -> Async<^U>
source : AsyncSeq<'T>
Returns: Async<^U>

AsyncSeq.bufferByCountAndTime bufferSize timeoutMs source

Full Usage: AsyncSeq.bufferByCountAndTime bufferSize timeoutMs source

Parameters:
    bufferSize : int
    timeoutMs : int
    source : AsyncSeq<'T>

Returns: AsyncSeq<'T[]>

Buffer items from the async sequence until a specified buffer size is reached or a specified amount of time is elapsed.

bufferSize : int
timeoutMs : int
source : AsyncSeq<'T>
Returns: AsyncSeq<'T[]>

AsyncSeq.bufferByTime timeMs source

Full Usage: AsyncSeq.bufferByTime timeMs source

Parameters:
Returns: AsyncSeq<'T[]>

Buffers items from the async sequence by the specified time interval. If no items are received in an intervel and empty array is emitted.

timeMs : int
source : AsyncSeq<'T>
Returns: AsyncSeq<'T[]>

AsyncSeq.cache source

Full Usage: AsyncSeq.cache source

Parameters:
Returns: AsyncSeq<'T>

Create a new asynchronous sequence that caches all elements of the sequence specified as the input. When accessing the resulting sequence multiple times, the input will still be evaluated only once

source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.choose chooser source

Full Usage: AsyncSeq.choose chooser source

Parameters:
    chooser : 'T -> 'U option
    source : AsyncSeq<'T>

Returns: AsyncSeq<'U>

Asynchronously iterates over the input sequence and generates 'x' for every input element for which the specified function returned 'Some(x)'

chooser : 'T -> 'U option
source : AsyncSeq<'T>
Returns: AsyncSeq<'U>

AsyncSeq.chooseAsync mapping source

Full Usage: AsyncSeq.chooseAsync mapping source

Parameters:
Returns: AsyncSeq<'R>

Asynchronously iterates over the input sequence and generates 'x' for every input element for which the specified asynchronous function returned 'Some(x)' The specified function is asynchronous (and the input sequence will be asked for the next element after the processing of an element completes).

mapping : 'T -> Async<'R option>
source : AsyncSeq<'T>
Returns: AsyncSeq<'R>

AsyncSeq.chunkBy projection source

Full Usage: AsyncSeq.chunkBy projection source

Parameters:
    projection : 'T -> 'Key
    source : AsyncSeq<'T>

Returns: AsyncSeq<'Key * 'T list>

Groups consecutive elements of the async sequence that share the same key (as computed by a projection) and yields each group as a pair of the key and a list of elements.

projection : 'T -> 'Key
source : AsyncSeq<'T>
Returns: AsyncSeq<'Key * 'T list>

AsyncSeq.chunkByAsync projection source

Full Usage: AsyncSeq.chunkByAsync projection source

Parameters:
Returns: AsyncSeq<'Key * 'T list>

Groups consecutive elements of the async sequence that share the same key (as computed by an async projection) and yields each group as a pair of the key and a list of elements.

projection : 'T -> Async<'Key>
source : AsyncSeq<'T>
Returns: AsyncSeq<'Key * 'T list>

AsyncSeq.chunkBySize chunkSize source

Full Usage: AsyncSeq.chunkBySize chunkSize source

Parameters:
Returns: AsyncSeq<'T[]>

Buffer items from the async sequence into buffers of a specified size. The last buffer returned may be less than the specified buffer size.

chunkSize : int
source : AsyncSeq<'T>
Returns: AsyncSeq<'T[]>

AsyncSeq.collect mapping source

Full Usage: AsyncSeq.collect mapping source

Parameters:
Returns: AsyncSeq<'TResult>

Creates an asynchronous sequence that iterates over the given input sequence. For every input element, it calls the the specified function and iterates over all elements generated by that asynchronous sequence. This is the 'bind' operation of the computation expression (exposed using the 'for' keyword in asyncSeq computation).

mapping : 'T -> AsyncSeq<'TResult>
source : AsyncSeq<'T>
Returns: AsyncSeq<'TResult>

AsyncSeq.collectAsync mapping source

Full Usage: AsyncSeq.collectAsync mapping source

Parameters:
Returns: AsyncSeq<'TResult>

Like AsyncSeq.collect but the mapping function is asynchronous. For every input element it calls the specified async function and iterates over all elements of the returned sequence.

mapping : 'T -> Async<AsyncSeq<'TResult>>
source : AsyncSeq<'T>
Returns: AsyncSeq<'TResult>

AsyncSeq.combineLatest source1 source2

Full Usage: AsyncSeq.combineLatest source1 source2

Parameters:
Returns: AsyncSeq<'a * 'b>

Merges two async sequences. The resulting async sequence produces an element when either input sequence produces an element, passing the new element from the emitting sequence and the previously emitted element from the other sequence. If either of the input sequences is empty, the resulting sequence is empty.

source1 : AsyncSeq<'a>
source2 : AsyncSeq<'b>
Returns: AsyncSeq<'a * 'b>

AsyncSeq.combineLatestWith combine source1 source2

Full Usage: AsyncSeq.combineLatestWith combine source1 source2

Parameters:
Returns: AsyncSeq<'V>

Merges two async sequences using the specified combine function. The resulting async sequence produces an element when either input sequence produces an element, passing the new element from the emitting sequence and the previously emitted element from the other sequence. If either of the input sequences is empty, the resulting sequence is empty.

combine : 'T -> 'U -> 'V
source1 : AsyncSeq<'T>
source2 : AsyncSeq<'U>
Returns: AsyncSeq<'V>

AsyncSeq.combineLatestWithAsync combine source1 source2

Full Usage: AsyncSeq.combineLatestWithAsync combine source1 source2

Parameters:
Returns: AsyncSeq<'V>

Merges two async sequences using the specified combine function. The resulting async sequence produces an element when either input sequence produces an element, passing the new element from the emitting sequence and the previously emitted element from the other sequence. If either of the input sequences is empty, the resulting sequence is empty.

combine : 'T -> 'U -> Async<'V>
source1 : AsyncSeq<'T>
source2 : AsyncSeq<'U>
Returns: AsyncSeq<'V>

AsyncSeq.compareWith comparer source1 source2

Full Usage: AsyncSeq.compareWith comparer source1 source2

Parameters:
Returns: Async<int>

Compares two async sequences lexicographically using the given synchronous comparison function. Returns a negative integer if source1 < source2, 0 if equal, and a positive integer if source1 > source2.

comparer : 'T -> 'T -> int
source1 : AsyncSeq<'T>
source2 : AsyncSeq<'T>
Returns: Async<int>

AsyncSeq.compareWithAsync comparer source1 source2

Full Usage: AsyncSeq.compareWithAsync comparer source1 source2

Parameters:
Returns: Async<int>

Compares two async sequences lexicographically using the given asynchronous comparison function. Returns a negative integer if source1 < source2, 0 if equal, and a positive integer if source1 > source2.

comparer : 'T -> 'T -> Async<int>
source1 : AsyncSeq<'T>
source2 : AsyncSeq<'T>
Returns: Async<int>

AsyncSeq.concat arg1

Full Usage: AsyncSeq.concat arg1

Parameters:
Returns: AsyncSeq<'T>

Flattens an AsyncSeq of asynchronous sequences.

arg0 : AsyncSeq<AsyncSeq<'T>>
Returns: AsyncSeq<'T>

AsyncSeq.concatSeq source

Full Usage: AsyncSeq.concatSeq source

Parameters:
Returns: AsyncSeq<'T>

Flattens an AsyncSeq of synchronous sequences.

source : AsyncSeq<'a>
Returns: AsyncSeq<'T>

AsyncSeq.contains value source

Full Usage: AsyncSeq.contains value source

Parameters:
Returns: Async<bool>

Asynchronously determine if the sequence contains the given value

value : 'T
source : AsyncSeq<'T>
Returns: Async<bool>

AsyncSeq.countBy projection source

Full Usage: AsyncSeq.countBy projection source

Parameters:
    projection : 'T -> 'Key
    source : AsyncSeq<'T>

Returns: Async<('Key * int) array>

Asynchronously count the elements of the input asynchronous sequence grouped by the result of the given key projection. Returns an array of (key, count) pairs.

projection : 'T -> 'Key
source : AsyncSeq<'T>
Returns: Async<('Key * int) array>

AsyncSeq.countByAsync projection source

Full Usage: AsyncSeq.countByAsync projection source

Parameters:
Returns: Async<('Key * int) array>

Asynchronously count the elements of the input asynchronous sequence grouped by the result of the given asynchronous key projection. Returns an array of (key, count) pairs.

projection : 'T -> Async<'Key>
source : AsyncSeq<'T>
Returns: Async<('Key * int) array>

AsyncSeq.delay f

Full Usage: AsyncSeq.delay f

Parameters:
Returns: AsyncSeq<'T>

Returns a new async sequence whose enumeration calls the factory function each time it is enumerated. Useful for deferring the creation of a sequence until enumeration begins.

f : unit -> AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.distinct source

Full Usage: AsyncSeq.distinct source

Parameters:
Returns: AsyncSeq<'T>

Returns an async sequence containing only distinct elements. Elements are compared using structural equality.

source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.distinctBy projection source

Full Usage: AsyncSeq.distinctBy projection source

Parameters:
    projection : 'T -> 'Key
    source : AsyncSeq<'T>

Returns: AsyncSeq<'T>

Returns an async sequence containing only distinct elements, determined by the given key projection. Elements are compared using structural equality on the projected key.

projection : 'T -> 'Key
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.distinctByAsync projection source

Full Usage: AsyncSeq.distinctByAsync projection source

Parameters:
Returns: AsyncSeq<'T>

Returns an async sequence containing only distinct elements, determined by the given asynchronous key projection. Elements are compared using structural equality on the projected key.

projection : 'T -> Async<'Key>
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.distinctUntilChanged source

Full Usage: AsyncSeq.distinctUntilChanged source

Parameters:
Returns: AsyncSeq<'T>

Returns an async sequence which contains no contiguous duplicate elements.

source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.distinctUntilChangedWith mapping source

Full Usage: AsyncSeq.distinctUntilChangedWith mapping source

Parameters:
    mapping : 'T -> 'T -> bool
    source : AsyncSeq<'T>

Returns: AsyncSeq<'T>

Returns an async sequence which contains no contiguous duplicate elements based on the specified comparison function.

mapping : 'T -> 'T -> bool
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.distinctUntilChangedWithAsync mapping source

Full Usage: AsyncSeq.distinctUntilChangedWithAsync mapping source

Parameters:
Returns: AsyncSeq<'T>

Returns an async sequence which contains no contiguous duplicate elements based on the specified comparison function.

mapping : 'T -> 'T -> Async<bool>
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.empty

Full Usage: AsyncSeq.empty

Returns: AsyncSeq<'T>

Creates an empty asynchronous sequence that immediately ends.

Returns: AsyncSeq<'T>

AsyncSeq.exactlyOne source

Full Usage: AsyncSeq.exactlyOne source

Parameters:
Returns: Async<'T>

Asynchronously returns the only element of the asynchronous sequence. Raises InvalidOperationException if the sequence is empty or contains more than one element.

source : AsyncSeq<'T>
Returns: Async<'T>

AsyncSeq.except excluded source

Full Usage: AsyncSeq.except excluded source

Parameters:
    excluded : 'T seq
    source : AsyncSeq<'T>

Returns: AsyncSeq<'T>

Returns a new asynchronous sequence containing only elements that are not present in the given excluded collection. Uses a HashSet for O(1) lookup. Mirrors Seq.except.

excluded : 'T seq
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.exists predicate source

Full Usage: AsyncSeq.exists predicate source

Parameters:
    predicate : 'T -> bool
    source : AsyncSeq<'T>

Returns: Async<bool>

Asynchronously determine if there is a value in the sequence for which the predicate returns true

predicate : 'T -> bool
source : AsyncSeq<'T>
Returns: Async<bool>

AsyncSeq.existsAsync predicate source

Full Usage: AsyncSeq.existsAsync predicate source

Parameters:
Returns: Async<bool>

Asynchronously determine if there is a value in the sequence for which the async predicate returns true

predicate : 'T -> Async<bool>
source : AsyncSeq<'T>
Returns: Async<bool>

AsyncSeq.filter predicate source

Full Usage: AsyncSeq.filter predicate source

Parameters:
    predicate : 'T -> bool
    source : AsyncSeq<'T>

Returns: AsyncSeq<'T>

Same as AsyncSeq.filterAsync, but the specified predicate is synchronous and processes the input element immediately.

predicate : 'T -> bool
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.filterAsync predicate source

Full Usage: AsyncSeq.filterAsync predicate source

Parameters:
Returns: AsyncSeq<'T>

Builds a new asynchronous sequence whose elements are those from the input sequence for which the specified function returned true. The specified function is asynchronous (and the input sequence will be asked for the next element after the processing of an element completes).

predicate : 'T -> Async<bool>
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.find predicate source

Full Usage: AsyncSeq.find predicate source

Parameters:
    predicate : 'T -> bool
    source : AsyncSeq<'T>

Returns: Async<'T>

Asynchronously find the first value in a sequence for which the predicate returns true. Raises KeyNotFoundException if no matching element is found.

predicate : 'T -> bool
source : AsyncSeq<'T>
Returns: Async<'T>

AsyncSeq.findAsync predicate source

Full Usage: AsyncSeq.findAsync predicate source

Parameters:
Returns: Async<'T>

Asynchronously find the first value in a sequence for which the async predicate returns true. Raises KeyNotFoundException if no matching element is found.

predicate : 'T -> Async<bool>
source : AsyncSeq<'T>
Returns: Async<'T>

AsyncSeq.findIndex predicate source

Full Usage: AsyncSeq.findIndex predicate source

Parameters:
    predicate : 'T -> bool
    source : AsyncSeq<'T>

Returns: Async<int>

Asynchronously find the index of the first value in a sequence for which the predicate returns true. Raises KeyNotFoundException if no matching element is found.

predicate : 'T -> bool
source : AsyncSeq<'T>
Returns: Async<int>

AsyncSeq.findIndexAsync predicate source

Full Usage: AsyncSeq.findIndexAsync predicate source

Parameters:
Returns: Async<int>

Asynchronously find the index of the first value in a sequence for which the async predicate returns true. Raises KeyNotFoundException if no matching element is found.

predicate : 'T -> Async<bool>
source : AsyncSeq<'T>
Returns: Async<int>

AsyncSeq.firstOrDefault default source

Full Usage: AsyncSeq.firstOrDefault default source

Parameters:
Returns: Async<'T>

Asynchronously returns the first element that was generated by the given asynchronous sequence (or the specified default value).

default : 'T
source : AsyncSeq<'T>
Returns: Async<'T>

AsyncSeq.fold folder state source

Full Usage: AsyncSeq.fold folder state source

Parameters:
    folder : 'State -> 'T -> 'State
    state : 'State
    source : AsyncSeq<'T>

Returns: Async<'State>

Asynchronously aggregate the elements of the input asynchronous sequence using the specified 'aggregation' function.

folder : 'State -> 'T -> 'State
state : 'State
source : AsyncSeq<'T>
Returns: Async<'State>

AsyncSeq.foldAsync folder state source

Full Usage: AsyncSeq.foldAsync folder state source

Parameters:
    folder : 'State -> 'T -> Async<'State>
    state : 'State
    source : AsyncSeq<'T>

Returns: Async<'State>

Asynchronously aggregate the elements of the input asynchronous sequence using the specified asynchronous 'aggregation' function.

folder : 'State -> 'T -> Async<'State>
state : 'State
source : AsyncSeq<'T>
Returns: Async<'State>

AsyncSeq.forall predicate source

Full Usage: AsyncSeq.forall predicate source

Parameters:
    predicate : 'T -> bool
    source : AsyncSeq<'T>

Returns: Async<bool>

Asynchronously determine if the predicate returns true for all values in the sequence

predicate : 'T -> bool
source : AsyncSeq<'T>
Returns: Async<bool>

AsyncSeq.forallAsync predicate source

Full Usage: AsyncSeq.forallAsync predicate source

Parameters:
Returns: Async<bool>

Asynchronously determine if the async predicate returns true for all values in the sequence

predicate : 'T -> Async<bool>
source : AsyncSeq<'T>
Returns: Async<bool>

AsyncSeq.fromChannel reader

Full Usage: AsyncSeq.fromChannel reader

Parameters:
Returns: AsyncSeq<'T>

Creates an async seq from a channel reader. The async seq will read values from the channel reader until it is closed. If the reader raises an error than the sequence will raise it.

reader : ChannelReader<'T>
Returns: AsyncSeq<'T>

AsyncSeq.getIterator source

Full Usage: AsyncSeq.getIterator source

Parameters:
Returns: unit -> Async<'T option>
source : AsyncSeq<'T>
Returns: unit -> Async<'T option>

AsyncSeq.groupBy projection source

Full Usage: AsyncSeq.groupBy projection source

Parameters:
    projection : 'T -> 'Key
    source : AsyncSeq<'T>

Returns: AsyncSeq<'Key * AsyncSeq<'T>>

Applies a key-generating function to each element and returns an async sequence containing unique keys and async sequences containing elements corresponding to the key. Note that the resulting async sequence has to be processed in parallel (e.g AsyncSeq.mapAsyncParallel) becaused completion of sub-sequences depends on completion of other sub-sequences.

projection : 'T -> 'Key
source : AsyncSeq<'T>
Returns: AsyncSeq<'Key * AsyncSeq<'T>>

AsyncSeq.groupByAsync projection source

Full Usage: AsyncSeq.groupByAsync projection source

Parameters:
Returns: AsyncSeq<'Key * AsyncSeq<'T>>

Applies a key-generating function to each element and returns an async sequence containing unique keys and async sequences containing elements corresponding to the key. Note that the resulting async sequence has to be processed in parallel (e.g AsyncSeq.mapAsyncParallel) becaused completion of sub-sequences depends on completion of other sub-sequences.

projection : 'T -> Async<'Key>
source : AsyncSeq<'T>
Returns: AsyncSeq<'Key * AsyncSeq<'T>>

AsyncSeq.head source

Full Usage: AsyncSeq.head source

Parameters:
Returns: Async<'T>

Asynchronously returns the first element of the asynchronous sequence. Raises InvalidOperationException if the sequence is empty.

source : AsyncSeq<'T>
Returns: Async<'T>

AsyncSeq.indexed source

Full Usage: AsyncSeq.indexed source

Parameters:
Returns: AsyncSeq<int64 * 'T>

Return an asynchronous sequence which, when iterated, includes an integer indicating the index of each element in the sequence.

source : AsyncSeq<'T>
Returns: AsyncSeq<int64 * 'T>

AsyncSeq.init count mapping

Full Usage: AsyncSeq.init count mapping

Parameters:
    count : int64
    mapping : int64 -> 'T

Returns: AsyncSeq<'T>

Generates a finite async sequence using the specified initialization function.

count : int64
mapping : int64 -> 'T
Returns: AsyncSeq<'T>

AsyncSeq.initAsync count mapping

Full Usage: AsyncSeq.initAsync count mapping

Parameters:
    count : int64
    mapping : int64 -> Async<'T>

Returns: AsyncSeq<'T>

Generates a finite async sequence using the specified asynchronous initialization function.

count : int64
mapping : int64 -> Async<'T>
Returns: AsyncSeq<'T>

AsyncSeq.initInfinite mapping

Full Usage: AsyncSeq.initInfinite mapping

Parameters:
    mapping : int64 -> 'T

Returns: AsyncSeq<'T>

Generates an infinite async sequence using the specified initialization function.

mapping : int64 -> 'T
Returns: AsyncSeq<'T>

AsyncSeq.initInfiniteAsync mapping

Full Usage: AsyncSeq.initInfiniteAsync mapping

Parameters:
    mapping : int64 -> Async<'T>

Returns: AsyncSeq<'T>

Generates an infinite async sequence using the specified asynchronous initialization function.

mapping : int64 -> Async<'T>
Returns: AsyncSeq<'T>

AsyncSeq.insertAt index value source

Full Usage: AsyncSeq.insertAt index value source

Parameters:
    index : int
    value : 'T
    source : AsyncSeq<'T>

Returns: AsyncSeq<'T>

Returns a new asynchronous sequence with the given value inserted before the element at the specified index. An index equal to the length of the sequence appends the value at the end. Raises ArgumentException if index is negative or greater than the sequence length. Mirrors Seq.insertAt.

index : int
value : 'T
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.interleave source1 source2

Full Usage: AsyncSeq.interleave source1 source2

Parameters:
Returns: AsyncSeq<'T>

Interleaves two async sequences of the same type into a resulting sequence. The provided sequences are consumed in lock-step.

source1 : AsyncSeq<'T>
source2 : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.interleaveChoice source1 source2

Full Usage: AsyncSeq.interleaveChoice source1 source2

Parameters:
Returns: AsyncSeq<Choice<'T1, 'T2>>

Interleaves two async sequences into a resulting sequence. The provided sequences are consumed in lock-step.

source1 : AsyncSeq<'T1>
source2 : AsyncSeq<'T2>
Returns: AsyncSeq<Choice<'T1, 'T2>>

AsyncSeq.interleaveMany source

Full Usage: AsyncSeq.interleaveMany source

Parameters:
    source : 'a

Returns: AsyncSeq<'T>

Interleaves a sequence of async sequences into a resulting async sequence. The provided sequences are consumed in lock-step.

source : 'a
Returns: AsyncSeq<'T>

AsyncSeq.intervalMs periodMs

Full Usage: AsyncSeq.intervalMs periodMs

Parameters:
    periodMs : int

Returns: AsyncSeq<DateTime>

Returns an async sequence which emits an element on a specified period.

periodMs : int
Returns: AsyncSeq<DateTime>

AsyncSeq.isEmpty source

Full Usage: AsyncSeq.isEmpty source

Parameters:
Returns: Async<bool>

Asynchronously returns true if the asynchronous sequence contains no elements, false otherwise. Short-circuits after the first element. Mirrors Seq.isEmpty.

source : AsyncSeq<'T>
Returns: Async<bool>

AsyncSeq.item index source

Full Usage: AsyncSeq.item index source

Parameters:
Returns: Async<'T>

Asynchronously returns the element at the specified index in the asynchronous sequence. Raises ArgumentException if the index is out of bounds, mirroring Seq.item.

index : int
source : AsyncSeq<'T>
Returns: Async<'T>

AsyncSeq.iter action source

Full Usage: AsyncSeq.iter action source

Parameters:
    action : 'T -> unit
    source : AsyncSeq<'T>

Returns: Async<unit>

Iterates over the input sequence and calls the specified function for every value.

action : 'T -> unit
source : AsyncSeq<'T>
Returns: Async<unit>

AsyncSeq.iterAsync action source

Full Usage: AsyncSeq.iterAsync action source

Parameters:
Returns: Async<unit>

Iterates over the input sequence and calls the specified asynchronous function for every value. The input sequence will be asked for the next element after the processing of an element completes.

action : 'T -> Async<unit>
source : AsyncSeq<'T>
Returns: Async<unit>

AsyncSeq.iterAsyncParallel action source

Full Usage: AsyncSeq.iterAsyncParallel action source

Parameters:
Returns: Async<unit>

Iterates over the input sequence and calls the specified asynchronous function for every value. Each action computation is started but not awaited before consuming the next item from the sequence, thereby iterating in parallel.

action : 'T -> Async<unit>
source : AsyncSeq<'T>
Returns: Async<unit>

AsyncSeq.iterAsyncParallelThrottled parallelism action source

Full Usage: AsyncSeq.iterAsyncParallelThrottled parallelism action source

Parameters:
    parallelism : int
    action : 'T -> Async<unit>
    source : AsyncSeq<'T>

Returns: Async<unit>

Iterates over the input sequence and calls the specified asynchronous function for every value. Each action computation is started but not awaited before consuming the next item from the sequence, thereby iterating in parallel with a specified degree of parallelism.

parallelism : int
action : 'T -> Async<unit>
source : AsyncSeq<'T>
Returns: Async<unit>

AsyncSeq.iteri action source

Full Usage: AsyncSeq.iteri action source

Parameters:
    action : int -> 'T -> unit
    source : AsyncSeq<'T>

Returns: Async<unit>

Iterates over the input sequence and calls the specified function for every value, passing along the index of that element.

action : int -> 'T -> unit
source : AsyncSeq<'T>
Returns: Async<unit>

AsyncSeq.iteriAsync action source

Full Usage: AsyncSeq.iteriAsync action source

Parameters:
Returns: Async<unit>

Iterates over the input sequence and calls the specified asynchronous function for every value, passing along the index of that element. The input sequence will be asked for the next element after the processing of an element completes.

action : int -> 'T -> Async<unit>
source : AsyncSeq<'T>
Returns: Async<unit>

AsyncSeq.last source

Full Usage: AsyncSeq.last source

Parameters:
Returns: Async<'T>

Asynchronously returns the last element of the asynchronous sequence. Raises InvalidOperationException if the sequence is empty, mirroring Seq.last.

source : AsyncSeq<'T>
Returns: Async<'T>

AsyncSeq.lastOrDefault default source

Full Usage: AsyncSeq.lastOrDefault default source

Parameters:
Returns: Async<'T>

Asynchronously returns the last element that was generated by the given asynchronous sequence (or the specified default value).

default : 'T
source : AsyncSeq<'T>
Returns: Async<'T>

AsyncSeq.length source

Full Usage: AsyncSeq.length source

Parameters:
Returns: Async<int64>

Asynchronously determine the number of elements in the sequence

source : AsyncSeq<'T>
Returns: Async<int64>

AsyncSeq.lengthBy predicate source

Full Usage: AsyncSeq.lengthBy predicate source

Parameters:
    predicate : 'T -> bool
    source : AsyncSeq<'T>

Returns: Async<int64>

Asynchronously returns the number of elements in the sequence for which the predicate returns true.

predicate : 'T -> bool
source : AsyncSeq<'T>
Returns: Async<int64>

AsyncSeq.lengthByAsync predicate source

Full Usage: AsyncSeq.lengthByAsync predicate source

Parameters:
Returns: Async<int64>

Asynchronously returns the number of elements in the sequence for which the async predicate returns true.

predicate : 'T -> Async<bool>
source : AsyncSeq<'T>
Returns: Async<int64>

AsyncSeq.map folder source

Full Usage: AsyncSeq.map folder source

Parameters:
    folder : 'T -> 'U
    source : AsyncSeq<'T>

Returns: AsyncSeq<'U>

Same as AsyncSeq.mapAsync, but the specified function is synchronous.

folder : 'T -> 'U
source : AsyncSeq<'T>
Returns: AsyncSeq<'U>

AsyncSeq.mapAsync mapping source

Full Usage: AsyncSeq.mapAsync mapping source

Parameters:
Returns: AsyncSeq<'TResult>

Builds a new asynchronous sequence whose elements are generated by applying the specified function to all elements of the input sequence. The specified function is asynchronous (and the input sequence will be asked for the next element after the processing of an element completes).

mapping : 'T -> Async<'TResult>
source : AsyncSeq<'T>
Returns: AsyncSeq<'TResult>

AsyncSeq.mapAsyncParallel mapping s

Full Usage: AsyncSeq.mapAsyncParallel mapping s

Parameters:
Returns: AsyncSeq<'U>

Builds a new asynchronous sequence whose elements are generated by applying the specified function to all elements of the input sequence. The function is applied to elements in order and results are emitted in order, but in parallel, without waiting for a prior mapping operation to complete. Parallelism is bound by the ThreadPool.

mapping : 'T -> Async<'U>
s : AsyncSeq<'T>
Returns: AsyncSeq<'U>

AsyncSeq.mapAsyncUnorderedParallel mapping s

Full Usage: AsyncSeq.mapAsyncUnorderedParallel mapping s

Parameters:
Returns: AsyncSeq<'U>

Builds a new asynchronous sequence whose elements are generated by applying the specified function to all elements of the input sequence. The function is applied to elements in parallel, and results are emitted in the order they complete (unordered), without preserving the original order. This can provide better performance than mapAsyncParallel when order doesn't matter. Parallelism is bound by the ThreadPool.

mapping : 'T -> Async<'U>
s : AsyncSeq<'T>
Returns: AsyncSeq<'U>

AsyncSeq.mapAsyncUnorderedParallelThrottled parallelism mapping s

Full Usage: AsyncSeq.mapAsyncUnorderedParallelThrottled parallelism mapping s

Parameters:
Returns: AsyncSeq<'U>

Builds a new asynchronous sequence whose elements are generated by applying the specified function to all elements of the input sequence, with at most parallelism mapping operations running concurrently. The function is applied to elements in parallel (throttled), and results are emitted in the order they complete (unordered), without preserving the original order.

parallelism : int
mapping : 'T -> Async<'U>
s : AsyncSeq<'T>
Returns: AsyncSeq<'U>

AsyncSeq.mapFold folder state source

Full Usage: AsyncSeq.mapFold folder state source

Parameters:
    folder : 'State -> 'T -> 'Result * 'State
    state : 'State
    source : AsyncSeq<'T>

Returns: Async<'Result array * 'State>

Maps each element of the async sequence with a folder function that also threads an accumulator state through the computation. Returns the array of results and the final state, mirroring Seq.mapFold.

folder : 'State -> 'T -> 'Result * 'State
state : 'State
source : AsyncSeq<'T>
Returns: Async<'Result array * 'State>

AsyncSeq.mapFoldAsync folder state source

Full Usage: AsyncSeq.mapFoldAsync folder state source

Parameters:
    folder : 'State -> 'T -> Async<'Result * 'State>
    state : 'State
    source : AsyncSeq<'T>

Returns: Async<'Result array * 'State>

Asynchronously maps each element of the async sequence with an asynchronous folder function that also threads an accumulator state through the computation. Returns the array of results and the final state, mirroring Seq.mapFold.

folder : 'State -> 'T -> Async<'Result * 'State>
state : 'State
source : AsyncSeq<'T>
Returns: Async<'Result array * 'State>

AsyncSeq.mapi mapping source

Full Usage: AsyncSeq.mapi mapping source

Parameters:
    mapping : int64 -> 'T -> 'U
    source : AsyncSeq<'T>

Returns: AsyncSeq<'U>

Builds a new asynchronous sequence whose elements are generated by applying the specified function to all elements of the input sequence. The specified function is synchronous (and the input sequence will be asked for the next element after the processing of an element completes).

mapping : int64 -> 'T -> 'U
source : AsyncSeq<'T>
Returns: AsyncSeq<'U>

AsyncSeq.mapiAsync mapping source

Full Usage: AsyncSeq.mapiAsync mapping source

Parameters:
Returns: AsyncSeq<'U>

Builds a new asynchronous sequence whose elements are generated by applying the specified function to all elements of the input sequence. The specified function is asynchronous (and the input sequence will be asked for the next element after the processing of an element completes).

mapping : int64 -> 'T -> Async<'U>
source : AsyncSeq<'T>
Returns: AsyncSeq<'U>

AsyncSeq.max source

Full Usage: AsyncSeq.max source

Parameters:
Returns: Async<'T>

Asynchronously find the maximum element. Raises InvalidOperationException if the sequence is empty.

source : AsyncSeq<'T>
Returns: Async<'T>

AsyncSeq.maxBy projection source

Full Usage: AsyncSeq.maxBy projection source

Parameters:
    projection : 'T -> 'Key
    source : AsyncSeq<'T>

Returns: Async<'T>

Asynchronously find the element with the maximum projected value. Raises InvalidOperationException if the sequence is empty.

projection : 'T -> 'Key
source : AsyncSeq<'T>
Returns: Async<'T>

AsyncSeq.maxByAsync projection source

Full Usage: AsyncSeq.maxByAsync projection source

Parameters:
Returns: Async<'T>

Asynchronously find the element with the maximum projected value. Raises InvalidOperationException if the sequence is empty.

projection : 'T -> Async<'Key>
source : AsyncSeq<'T>
Returns: Async<'T>

AsyncSeq.merge source1 source2

Full Usage: AsyncSeq.merge source1 source2

Parameters:
Returns: AsyncSeq<'T>

Merges two async sequences of the same type into an async sequence non-deterministically. The resulting async sequence produces elements when any argument sequence produces an element.

source1 : AsyncSeq<'T>
source2 : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.mergeAll sources

Full Usage: AsyncSeq.mergeAll sources

Parameters:
Returns: AsyncSeq<'T>

Merges all specified async sequences into an async sequence non-deterministically. The resulting async sequence produces elements when any argument sequence produces an element.

sources : AsyncSeq<'T> seq
Returns: AsyncSeq<'T>

AsyncSeq.mergeChoice source1 source2

Full Usage: AsyncSeq.mergeChoice source1 source2

Parameters:
Returns: AsyncSeq<Choice<'T1, 'T2>>

Merges two async sequences into an async sequence non-deterministically. The resulting async sequence produces elements when any argument sequence produces an element.

source1 : AsyncSeq<'T1>
source2 : AsyncSeq<'T2>
Returns: AsyncSeq<Choice<'T1, 'T2>>

AsyncSeq.min source

Full Usage: AsyncSeq.min source

Parameters:
Returns: Async<'T>

Asynchronously find the minimum element. Raises InvalidOperationException if the sequence is empty.

source : AsyncSeq<'T>
Returns: Async<'T>

AsyncSeq.minBy projection source

Full Usage: AsyncSeq.minBy projection source

Parameters:
    projection : 'T -> 'Key
    source : AsyncSeq<'T>

Returns: Async<'T>

Asynchronously find the element with the minimum projected value. Raises InvalidOperationException if the sequence is empty.

projection : 'T -> 'Key
source : AsyncSeq<'T>
Returns: Async<'T>

AsyncSeq.minByAsync projection source

Full Usage: AsyncSeq.minByAsync projection source

Parameters:
Returns: Async<'T>

Asynchronously find the element with the minimum projected value. Raises InvalidOperationException if the sequence is empty.

projection : 'T -> Async<'Key>
source : AsyncSeq<'T>
Returns: Async<'T>

AsyncSeq.ofIQueryable source

Full Usage: AsyncSeq.ofIQueryable source

Parameters:
Returns: AsyncSeq<'T>
source : IQueryable<'T>
Returns: AsyncSeq<'T>

AsyncSeq.ofObservableBuffered source

Full Usage: AsyncSeq.ofObservableBuffered source

Parameters:
Returns: AsyncSeq<'T>

Converts observable to an asynchronous sequence. Values that are produced by the observable while the asynchronous sequence is blocked are stored to an unbounded buffer and are returned as next elements of the async sequence.

source : IObservable<'T>
Returns: AsyncSeq<'T>

AsyncSeq.ofSeq source

Full Usage: AsyncSeq.ofSeq source

Parameters:
    source : 'T seq

Returns: AsyncSeq<'T>

Creates an asynchronous sequence that lazily takes element from an input synchronous sequence and returns them one-by-one.

source : 'T seq
Returns: AsyncSeq<'T>

AsyncSeq.ofSeqAsync arg1

Full Usage: AsyncSeq.ofSeqAsync arg1

Parameters:
Returns: AsyncSeq<'T>

Creates an asynchronous sequence that lazily takes element from an input synchronous sequence of asynchronous computation and returns them one-by-one.

arg0 : Async<'T> seq
Returns: AsyncSeq<'T>

AsyncSeq.pairwise source

Full Usage: AsyncSeq.pairwise source

Parameters:
Returns: AsyncSeq<'T * 'T>

Returns an asynchronous sequence that returns pairs containing an element from the input sequence and its predecessor. Empty sequence is returned for singleton input sequence.

source : AsyncSeq<'T>
Returns: AsyncSeq<'T * 'T>

AsyncSeq.partition predicate source

Full Usage: AsyncSeq.partition predicate source

Parameters:
    predicate : 'T -> bool
    source : AsyncSeq<'T>

Returns: Async<'T[] * 'T[]>

Splits the sequence into two arrays: the first contains elements for which the predicate returns true, the second contains elements for which it returns false. Mirrors Seq.partition.

predicate : 'T -> bool
source : AsyncSeq<'T>
Returns: Async<'T[] * 'T[]>

AsyncSeq.partitionAsync predicate source

Full Usage: AsyncSeq.partitionAsync predicate source

Parameters:
Returns: Async<'T[] * 'T[]>

Splits the sequence into two arrays using an async predicate: the first contains elements for which the predicate returns true, the second contains elements for which it returns false.

predicate : 'T -> Async<bool>
source : AsyncSeq<'T>
Returns: Async<'T[] * 'T[]>

AsyncSeq.pick chooser source

Full Usage: AsyncSeq.pick chooser source

Parameters:
    chooser : 'T -> 'TResult option
    source : AsyncSeq<'T>

Returns: Async<'TResult>

Asynchronously pick a value from a sequence based on the specified chooser function. Raises KeyNotFoundException if the chooser function can't find a matching key.

chooser : 'T -> 'TResult option
source : AsyncSeq<'T>
Returns: Async<'TResult>

AsyncSeq.pickAsync chooser source

Full Usage: AsyncSeq.pickAsync chooser source

Parameters:
Returns: Async<'TResult>

Asynchronously pick a value from a sequence based on the specified chooser function. Raises KeyNotFoundException if the chooser function can't find a matching key.

chooser : 'T -> Async<'TResult option>
source : AsyncSeq<'T>
Returns: Async<'TResult>

AsyncSeq.prefetch numberToPrefetch source

Full Usage: AsyncSeq.prefetch numberToPrefetch source

Parameters:
    numberToPrefetch : int
    source : AsyncSeq<'T>

Returns: AsyncSeq<'T>

Transforms an async seq to a new one that fetches values ahead of time to improve throughput.

numberToPrefetch : int
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.prependSeq seq1 source

Full Usage: AsyncSeq.prependSeq seq1 source

Parameters:
Returns: AsyncSeq<'T>

Yields all elements of the synchronous sequence first and then all elements of the source asynchronous sequence.

seq1 : 'T seq
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.reduce reduction source

Full Usage: AsyncSeq.reduce reduction source

Parameters:
    reduction : 'T -> 'T -> 'T
    source : AsyncSeq<'T>

Returns: Async<'T>

Asynchronously reduce the elements of the input asynchronous sequence using the specified 'reduction' function. Raises InvalidOperationException if the sequence is empty.

reduction : 'T -> 'T -> 'T
source : AsyncSeq<'T>
Returns: Async<'T>

AsyncSeq.reduceAsync reduction source

Full Usage: AsyncSeq.reduceAsync reduction source

Parameters:
Returns: Async<'T>

Asynchronously reduce the elements of the input asynchronous sequence using the specified asynchronous 'reduction' function. Raises InvalidOperationException if the sequence is empty.

reduction : 'T -> 'T -> Async<'T>
source : AsyncSeq<'T>
Returns: Async<'T>

AsyncSeq.removeAt index source

Full Usage: AsyncSeq.removeAt index source

Parameters:
Returns: AsyncSeq<'T>

Returns a new asynchronous sequence with the element at the specified index removed. Raises ArgumentException if index is negative. Mirrors Seq.removeAt.

index : int
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.replicate count v

Full Usage: AsyncSeq.replicate count v

Parameters:
    count : int
    v : 'T

Returns: AsyncSeq<'T>

Creates an async sequence which repeats the specified value the indicated number of times.

count : int
v : 'T
Returns: AsyncSeq<'T>

AsyncSeq.replicateInfinite v

Full Usage: AsyncSeq.replicateInfinite v

Parameters:
    v : 'T

Returns: AsyncSeq<'T>

Creates an infinite async sequence which repeats the specified value.

v : 'T
Returns: AsyncSeq<'T>

AsyncSeq.replicateInfiniteAsync v

Full Usage: AsyncSeq.replicateInfiniteAsync v

Parameters:
Returns: AsyncSeq<'T>

Creates an infinite async sequence which repeatedly evaluates and emits the specified async value.

v : Async<'T>
Returns: AsyncSeq<'T>

AsyncSeq.replicateUntilNoneAsync arg1

Full Usage: AsyncSeq.replicateUntilNoneAsync arg1

Parameters:
    arg0 : Async<'T option>

Returns: AsyncSeq<'T>

Creates an async sequence given by evaluating the specified async computation until it returns None.

arg0 : Async<'T option>
Returns: AsyncSeq<'T>

AsyncSeq.rev source

Full Usage: AsyncSeq.rev source

Parameters:
Returns: AsyncSeq<'T>

Returns a new async sequence with the elements in reverse order. The entire source sequence is buffered before yielding any elements, mirroring Seq.rev. This function should not be used with large or infinite sequences.

source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.scan folder state source

Full Usage: AsyncSeq.scan folder state source

Parameters:
    folder : 'State -> 'T -> 'State
    state : 'State
    source : AsyncSeq<'T>

Returns: AsyncSeq<'State>

Same as AsyncSeq.scanAsync, but the specified function is synchronous.

folder : 'State -> 'T -> 'State
state : 'State
source : AsyncSeq<'T>
Returns: AsyncSeq<'State>

AsyncSeq.scanAsync folder state source

Full Usage: AsyncSeq.scanAsync folder state source

Parameters:
    folder : 'State -> 'T -> Async<'State>
    state : 'State
    source : AsyncSeq<'T>

Returns: AsyncSeq<'State>

Aggregates the elements of the input asynchronous sequence using the specified 'aggregation' function. The result is an asynchronous sequence of intermediate aggregation result. The aggregation function is asynchronous (and the input sequence will be asked for the next element after the processing of an element completes).

folder : 'State -> 'T -> Async<'State>
state : 'State
source : AsyncSeq<'T>
Returns: AsyncSeq<'State>

AsyncSeq.singleton v

Full Usage: AsyncSeq.singleton v

Parameters:
    v : 'T

Returns: AsyncSeq<'T>

Creates an asynchronous sequence that generates a single element and then ends.

v : 'T
Returns: AsyncSeq<'T>

AsyncSeq.skip count source

Full Usage: AsyncSeq.skip count source

Parameters:
Returns: AsyncSeq<'T>

Skips the first N elements of an asynchronous sequence and then returns the rest of the sequence unmodified.

count : int
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.skipUntilSignal signal source

Full Usage: AsyncSeq.skipUntilSignal signal source

Parameters:
Returns: AsyncSeq<'T>

Skips elements from an async sequence until the specified signal completes.

signal : Async<unit>
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.skipWhile predicate source

Full Usage: AsyncSeq.skipWhile predicate source

Parameters:
    predicate : 'T -> bool
    source : AsyncSeq<'T>

Returns: AsyncSeq<'T>

Skips elements from an asynchronous sequence while the specified predicate holds and then returns the rest of the sequence. The predicate is evaluated asynchronously.

predicate : 'T -> bool
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.skipWhileAsync predicate source

Full Usage: AsyncSeq.skipWhileAsync predicate source

Parameters:
Returns: AsyncSeq<'T>

Skips elements from an asynchronous sequence while the specified predicate holds and then returns the rest of the sequence. The predicate is evaluated asynchronously.

predicate : 'T -> Async<bool>
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.skipWhileInclusive predicate source

Full Usage: AsyncSeq.skipWhileInclusive predicate source

Parameters:
    predicate : 'T -> bool
    source : AsyncSeq<'T>

Returns: AsyncSeq<'T>

Skips elements from an asynchronous sequence while the predicate holds AND also skips the first element for which the predicate returns false (the boundary element), then returns the rest.

predicate : 'T -> bool
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.skipWhileInclusiveAsync predicate source

Full Usage: AsyncSeq.skipWhileInclusiveAsync predicate source

Parameters:
Returns: AsyncSeq<'T>

Skips elements from an asynchronous sequence while the async predicate holds AND also skips the first element for which the predicate returns false (the boundary element), then returns the rest.

predicate : 'T -> Async<bool>
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.sort source

Full Usage: AsyncSeq.sort source

Parameters:
Returns: 'T array

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.

source : AsyncSeq<'T>
Returns: 'T array

AsyncSeq.sortBy projection source

Full Usage: AsyncSeq.sortBy projection source

Parameters:
    projection : 'T -> 'Key
    source : AsyncSeq<'T>

Returns: 'T array

Applies a key-generating function to each element of an AsyncSeq and yield an array ordered by keys. This function returns an array 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.

projection : 'T -> 'Key
source : AsyncSeq<'T>
Returns: 'T array

AsyncSeq.sortByDescending projection source

Full Usage: AsyncSeq.sortByDescending projection source

Parameters:
    projection : 'T -> 'Key
    source : AsyncSeq<'T>

Returns: 'T array

Applies a key-generating function to each element of an AsyncSeq and yield an array ordered descending by keys. This function returns an array 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.

projection : 'T -> 'Key
source : AsyncSeq<'T>
Returns: 'T array

AsyncSeq.sortDescending source

Full Usage: AsyncSeq.sortDescending source

Parameters:
Returns: 'T array

Yields an array ordered descending by keys. This function returns an array 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.

source : AsyncSeq<'T>
Returns: 'T array

AsyncSeq.sortWith comparer source

Full Usage: AsyncSeq.sortWith comparer source

Parameters:
    comparer : 'T -> 'T -> int
    source : AsyncSeq<'T>

Returns: 'T array

Sorts the given async sequence using the given comparison function and returns an array. This function returns an array 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.

comparer : 'T -> 'T -> int
source : AsyncSeq<'T>
Returns: 'T array

AsyncSeq.splitAt count source

Full Usage: AsyncSeq.splitAt count source

Parameters:
Returns: Async<'T array * AsyncSeq<'T>>

Splits an async sequence at the given index. Returns an async computation that yields the first `count` elements as an array and the remaining elements as a new AsyncSeq. The source is enumerated once; the returned AsyncSeq lazily produces the remainder.

count : int
source : AsyncSeq<'T>
Returns: Async<'T array * AsyncSeq<'T>>

AsyncSeq.sum source

Full Usage: AsyncSeq.sum source

Parameters:
Returns: Async<^T>
Modifiers: inline
Type parameters: ^T

Asynchronously sum the elements of the input asynchronous sequence using the specified function.

source : AsyncSeq<^T>
Returns: Async<^T>

AsyncSeq.sumBy projection source

Full Usage: AsyncSeq.sumBy projection source

Parameters:
    projection : 'T -> ^U
    source : AsyncSeq<'T>

Returns: Async<^U>
Modifiers: inline
Type parameters: 'T, ^U

Asynchronously sum the mapped elements of an asynchronous sequence using a synchronous projection.

projection : 'T -> ^U
source : AsyncSeq<'T>
Returns: Async<^U>

AsyncSeq.sumByAsync projection source

Full Usage: AsyncSeq.sumByAsync projection source

Parameters:
Returns: Async<^U>
Modifiers: inline
Type parameters: 'T, ^U

Asynchronously sum the mapped elements of an asynchronous sequence using an asynchronous projection.

projection : 'T -> Async<^U>
source : AsyncSeq<'T>
Returns: Async<^U>

AsyncSeq.tail source

Full Usage: AsyncSeq.tail source

Parameters:
Returns: AsyncSeq<'T>

Returns an asynchronous sequence that skips the first element of the input sequence. Returns an empty sequence if the source is empty.

source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.take count source

Full Usage: AsyncSeq.take count source

Parameters:
Returns: AsyncSeq<'T>

Returns the first N elements of an asynchronous sequence does not cast an exception if count is larger than the sequence length.

count : int
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.takeUntilSignal signal source

Full Usage: AsyncSeq.takeUntilSignal signal source

Parameters:
Returns: AsyncSeq<'T>

Returns elements from the argument async sequence until the specified signal completes or the sequences completes.

signal : Async<unit>
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.takeWhile predicate source

Full Usage: AsyncSeq.takeWhile predicate source

Parameters:
    predicate : 'T -> bool
    source : AsyncSeq<'T>

Returns: AsyncSeq<'T>

Returns elements from an asynchronous sequence while the specified predicate holds. The predicate is evaluated synchronously.

predicate : 'T -> bool
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.takeWhileAsync predicate source

Full Usage: AsyncSeq.takeWhileAsync predicate source

Parameters:
Returns: AsyncSeq<'T>

Returns elements from an asynchronous sequence while the specified predicate holds. The predicate is evaluated asynchronously.

predicate : 'T -> Async<bool>
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.takeWhileInclusive predicate source

Full Usage: AsyncSeq.takeWhileInclusive predicate source

Parameters:
    predicate : 'T -> bool
    source : AsyncSeq<'T>

Returns: AsyncSeq<'T>

Returns elements from an asynchronous sequence while the specified predicate holds. The predicate is evaluated synchronously. Does return the first element that predicate fails

predicate : 'T -> bool
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.takeWhileInclusiveAsync predicate source

Full Usage: AsyncSeq.takeWhileInclusiveAsync predicate source

Parameters:
Returns: AsyncSeq<'T>

Returns elements from an asynchronous sequence while the specified async predicate holds, and also returns the first element for which the predicate returns false (inclusive).

predicate : 'T -> Async<bool>
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.threadStateAsync folder st source

Full Usage: AsyncSeq.threadStateAsync folder st source

Parameters:
    folder : 'State -> 'T -> Async<'U * 'State>
    st : 'State
    source : AsyncSeq<'T>

Returns: AsyncSeq<'U>

Threads a state through the mapping over an async sequence using an async function.

folder : 'State -> 'T -> Async<'U * 'State>
st : 'State
source : AsyncSeq<'T>
Returns: AsyncSeq<'U>

AsyncSeq.toArrayAsync source

Full Usage: AsyncSeq.toArrayAsync source

Parameters:
Returns: Async<'T[]>

Creates an async computation which iterates the AsyncSeq and collects the output into an array.

source : AsyncSeq<'T>
Returns: Async<'T[]>

AsyncSeq.toArraySynchronously source

Full Usage: AsyncSeq.toArraySynchronously source

Parameters:
Returns: 'T[]

Synchronously iterates the AsyncSeq and collects the output into an array.

source : AsyncSeq<'T>
Returns: 'T[]

AsyncSeq.toBlockingSeq source

Full Usage: AsyncSeq.toBlockingSeq source

Parameters:
Returns: 'T seq

Converts asynchronous sequence to a synchronous blocking sequence. The elements of the asynchronous sequence are consumed lazily.

source : AsyncSeq<'T>
Returns: 'T seq

AsyncSeq.toChannel writer source

Full Usage: AsyncSeq.toChannel writer source

Parameters:
Returns: Async<unit>

Fills a channel writer with the values from an async seq. The writer will be closed when the async seq completes or raises an error.

writer : ChannelWriter<'T>
source : AsyncSeq<'T>
Returns: Async<unit>

AsyncSeq.toListAsync source

Full Usage: AsyncSeq.toListAsync source

Parameters:
Returns: Async<'T list>

Creates an async computation which iterates the AsyncSeq and collects the output into a list.

source : AsyncSeq<'T>
Returns: Async<'T list>

AsyncSeq.toListSynchronously source

Full Usage: AsyncSeq.toListSynchronously source

Parameters:
Returns: 'T list

Synchronously iterates the AsyncSeq and collects the output into a list.

source : AsyncSeq<'T>
Returns: 'T list

AsyncSeq.toObservable source

Full Usage: AsyncSeq.toObservable source

Parameters:
Returns: IObservable<'T>

Converts asynchronous sequence to an IObservable<_>. When the client subscribes to the observable, a new copy of asynchronous sequence is started and is sequentially iterated over (at the maximal possible speed). Disposing of the observer cancels the iteration over asynchronous sequence.

source : AsyncSeq<'T>
Returns: IObservable<'T>

AsyncSeq.traverseChoiceAsync mapping source

Full Usage: AsyncSeq.traverseChoiceAsync mapping source

Parameters:
Returns: Async<Choice<AsyncSeq<'U>, 'e>>

Traverses an async sequence an applies to specified function such that if Choice2Of2 is returned the traversal short-circuits and Choice2Of2 is returned as the result. Otherwise, the entire sequence is traversed and the result returned as Choice1Of2.

mapping : 'T -> Async<Choice<'U, 'e>>
source : AsyncSeq<'T>
Returns: Async<Choice<AsyncSeq<'U>, 'e>>

AsyncSeq.traverseOptionAsync mapping source

Full Usage: AsyncSeq.traverseOptionAsync mapping source

Parameters:
Returns: Async<AsyncSeq<'U> option>

Traverses an async sequence an applies to specified function such that if None is returned the traversal short-circuits and None is returned as the result. Otherwise, the entire sequence is traversed and the result returned as Some.

mapping : 'T -> Async<'U option>
source : AsyncSeq<'T>
Returns: Async<AsyncSeq<'U> option>

AsyncSeq.truncate count source

Full Usage: AsyncSeq.truncate count source

Parameters:
Returns: AsyncSeq<'T>

Alias for take

count : int
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.tryExactlyOne source

Full Usage: AsyncSeq.tryExactlyOne source

Parameters:
Returns: Async<'T option>

Asynchronously returns the only element of the asynchronous sequence, or None if the sequence is empty or contains more than one element.

source : AsyncSeq<'T>
Returns: Async<'T option>

AsyncSeq.tryFind predicate source

Full Usage: AsyncSeq.tryFind predicate source

Parameters:
    predicate : 'T -> bool
    source : AsyncSeq<'T>

Returns: Async<'T option>

Asynchronously find the first value in a sequence for which the predicate returns true

predicate : 'T -> bool
source : AsyncSeq<'T>
Returns: Async<'T option>

AsyncSeq.tryFindAsync predicate source

Full Usage: AsyncSeq.tryFindAsync predicate source

Parameters:
Returns: Async<'T option>

Asynchronously find the first value in a sequence for which the async predicate returns true

predicate : 'T -> Async<bool>
source : AsyncSeq<'T>
Returns: Async<'T option>

AsyncSeq.tryFindIndex predicate source

Full Usage: AsyncSeq.tryFindIndex predicate source

Parameters:
    predicate : 'T -> bool
    source : AsyncSeq<'T>

Returns: Async<int option>

Asynchronously find the index of the first value in a sequence for which the predicate returns true. Returns None if no matching element is found.

predicate : 'T -> bool
source : AsyncSeq<'T>
Returns: Async<int option>

AsyncSeq.tryFindIndexAsync predicate source

Full Usage: AsyncSeq.tryFindIndexAsync predicate source

Parameters:
Returns: Async<int option>

Asynchronously find the index of the first value in a sequence for which the async predicate returns true. Returns None if no matching element is found.

predicate : 'T -> Async<bool>
source : AsyncSeq<'T>
Returns: Async<int option>

AsyncSeq.tryFirst source

Full Usage: AsyncSeq.tryFirst source

Parameters:
Returns: Async<'T option>

Asynchronously returns the first element that was generated by the given asynchronous sequence (or None if the sequence is empty).

source : AsyncSeq<'T>
Returns: Async<'T option>

AsyncSeq.tryHead source

Full Usage: AsyncSeq.tryHead source

Parameters:
Returns: Async<'T option>

Asynchronously returns the first element of the asynchronous sequence as an option, or None if the sequence is empty. Mirrors Seq.tryHead.

source : AsyncSeq<'T>
Returns: Async<'T option>

AsyncSeq.tryItem index source

Full Usage: AsyncSeq.tryItem index source

Parameters:
Returns: Async<'T option>

Asynchronously returns the element at the specified index in the asynchronous sequence, or None if the index is out of bounds, mirroring Seq.tryItem.

index : int
source : AsyncSeq<'T>
Returns: Async<'T option>

AsyncSeq.tryLast source

Full Usage: AsyncSeq.tryLast source

Parameters:
Returns: Async<'T option>

Asynchronously returns the last element that was generated by the given asynchronous sequence (or None if the sequence is empty).

source : AsyncSeq<'T>
Returns: Async<'T option>

AsyncSeq.tryPick chooser source

Full Usage: AsyncSeq.tryPick chooser source

Parameters:
    chooser : 'T -> 'TResult option
    source : AsyncSeq<'T>

Returns: Async<'TResult option>

Asynchronously pick a value from a sequence based on the specified chooser function.

chooser : 'T -> 'TResult option
source : AsyncSeq<'T>
Returns: Async<'TResult option>

AsyncSeq.tryPickAsync chooser source

Full Usage: AsyncSeq.tryPickAsync chooser source

Parameters:
Returns: Async<'TResult option>

Asynchronously pick a value from a sequence based on the specified chooser function.

chooser : 'T -> Async<'TResult option>
source : AsyncSeq<'T>
Returns: Async<'TResult option>

AsyncSeq.tryTail source

Full Usage: AsyncSeq.tryTail source

Parameters:
Returns: Async<AsyncSeq<'T> option>

Returns None if the source sequence is empty; otherwise returns Some of an async sequence containing all elements except the first. The source is enumerated once.

source : AsyncSeq<'T>
Returns: Async<AsyncSeq<'T> option>

AsyncSeq.unfold generator state

Full Usage: AsyncSeq.unfold generator state

Parameters:
    generator : 'State -> ('T * 'State) option
    state : 'State

Returns: AsyncSeq<'T>

Generates an async sequence using the specified generator function.

generator : 'State -> ('T * 'State) option
state : 'State
Returns: AsyncSeq<'T>

AsyncSeq.unfoldAsync generator state

Full Usage: AsyncSeq.unfoldAsync generator state

Parameters:
    generator : 'State -> Async<('T * 'State) option>
    state : 'State

Returns: AsyncSeq<'T>

Generates an async sequence using the specified asynchronous generator function.

generator : 'State -> Async<('T * 'State) option>
state : 'State
Returns: AsyncSeq<'T>

AsyncSeq.updateAt index value source

Full Usage: AsyncSeq.updateAt index value source

Parameters:
    index : int
    value : 'T
    source : AsyncSeq<'T>

Returns: AsyncSeq<'T>

Returns a new asynchronous sequence with the element at the specified index replaced by the given value. Raises ArgumentException if index is negative. Mirrors Seq.updateAt.

index : int
value : 'T
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.where predicate source

Full Usage: AsyncSeq.where predicate source

Parameters:
    predicate : 'T -> bool
    source : AsyncSeq<'T>

Returns: AsyncSeq<'T>

Alias for AsyncSeq.filter. Returns elements for which the predicate returns true. Mirrors the naming convention in TaskSeq and FSharp.Core.

predicate : 'T -> bool
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.whereAsync predicate source

Full Usage: AsyncSeq.whereAsync predicate source

Parameters:
Returns: AsyncSeq<'T>

Alias for AsyncSeq.filterAsync. Returns elements for which the async predicate returns true.

predicate : 'T -> Async<bool>
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.windowed windowSize source

Full Usage: AsyncSeq.windowed windowSize source

Parameters:
    windowSize : int
    source : AsyncSeq<'T>

Returns: AsyncSeq<'T[]>

Returns an asynchronous sequence that yields sliding windows of the given size over the source sequence, each yielded as an array. The first window is emitted once windowSize elements have been consumed; subsequent windows slide one element at a time. The sequence is empty when the source has fewer than windowSize elements. Raises System.ArgumentException if windowSize is less than 1.

windowSize : int
source : AsyncSeq<'T>
Returns: AsyncSeq<'T[]>

AsyncSeq.withCancellation cancellationToken source

Full Usage: AsyncSeq.withCancellation cancellationToken source

Parameters:
Returns: AsyncSeq<'T>

Returns a new AsyncSeq that passes the given CancellationToken to GetAsyncEnumerator, overriding whatever token would otherwise be used when iterating. This is useful when consuming sequences from libraries such as Entity Framework that accept a CancellationToken through GetAsyncEnumerator.

cancellationToken : CancellationToken
source : AsyncSeq<'T>
Returns: AsyncSeq<'T>

AsyncSeq.zapp functions source

Full Usage: AsyncSeq.zapp functions source

Parameters:
Returns: AsyncSeq<'U>

Feeds an async sequence of values into an async sequence of functions.

functions : AsyncSeq<('T -> 'U)>
source : AsyncSeq<'T>
Returns: AsyncSeq<'U>

AsyncSeq.zappAsync functions source

Full Usage: AsyncSeq.zappAsync functions source

Parameters:
Returns: AsyncSeq<'U>

Feeds an async sequence of values into an async sequence of async functions.

functions : AsyncSeq<('T -> Async<'U>)>
source : AsyncSeq<'T>
Returns: AsyncSeq<'U>

AsyncSeq.zip input1 input2

Full Usage: AsyncSeq.zip input1 input2

Parameters:
Returns: AsyncSeq<'T1 * 'T2>

Combines two asynchronous sequences into a sequence of pairs. The resulting sequence stops when either of the argument sequences stop.

input1 : AsyncSeq<'T1>
input2 : AsyncSeq<'T2>
Returns: AsyncSeq<'T1 * 'T2>

AsyncSeq.zip3 source1 source2 source3

Full Usage: AsyncSeq.zip3 source1 source2 source3

Parameters:
Returns: AsyncSeq<'T1 * 'T2 * 'T3>

Combines three asynchronous sequences into a sequence of triples. The resulting sequence stops when any of the argument sequences stop.

source1 : AsyncSeq<'T1>
source2 : AsyncSeq<'T2>
source3 : AsyncSeq<'T3>
Returns: AsyncSeq<'T1 * 'T2 * 'T3>

AsyncSeq.zipParallel input1 input2

Full Usage: AsyncSeq.zipParallel input1 input2

Parameters:
Returns: AsyncSeq<'T1 * 'T2>

Combines two asynchronous sequences into a sequence of pairs. The values from sequences are retrieved in parallel. The resulting sequence stops when either of the argument sequences stop.

input1 : AsyncSeq<'T1>
input2 : AsyncSeq<'T2>
Returns: AsyncSeq<'T1 * 'T2>

AsyncSeq.zipWith mapping source1 source2

Full Usage: AsyncSeq.zipWith mapping source1 source2

Parameters:
Returns: AsyncSeq<'U>

Combines two asynchronous sequences using the specified function. The resulting sequence stops when either of the argument sequences stop.

mapping : 'T1 -> 'T2 -> 'U
source1 : AsyncSeq<'T1>
source2 : AsyncSeq<'T2>
Returns: AsyncSeq<'U>

AsyncSeq.zipWith3 mapping source1 source2 source3

Full Usage: AsyncSeq.zipWith3 mapping source1 source2 source3

Parameters:
Returns: AsyncSeq<'U>

Combines three asynchronous sequences using the specified function. The resulting sequence stops when any of the argument sequences stop.

mapping : 'T1 -> 'T2 -> 'T3 -> 'U
source1 : AsyncSeq<'T1>
source2 : AsyncSeq<'T2>
source3 : AsyncSeq<'T3>
Returns: AsyncSeq<'U>

AsyncSeq.zipWithAsync mapping source1 source2

Full Usage: AsyncSeq.zipWithAsync mapping source1 source2

Parameters:
Returns: AsyncSeq<'U>

Combines two asynchronous sequences using the specified function. The resulting sequence stops when either of the argument sequences stop.

mapping : 'T1 -> 'T2 -> Async<'U>
source1 : AsyncSeq<'T1>
source2 : AsyncSeq<'T2>
Returns: AsyncSeq<'U>

AsyncSeq.zipWithAsync3 mapping source1 source2 source3

Full Usage: AsyncSeq.zipWithAsync3 mapping source1 source2 source3

Parameters:
Returns: AsyncSeq<'U>

Combines three asynchronous sequences using the specified asynchronous function. The resulting sequence stops when any of the argument sequences stop.

mapping : 'T1 -> 'T2 -> 'T3 -> Async<'U>
source1 : AsyncSeq<'T1>
source2 : AsyncSeq<'T2>
source3 : AsyncSeq<'T3>
Returns: AsyncSeq<'U>

AsyncSeq.zipWithAsyncParallel mapping source1 source2

Full Usage: AsyncSeq.zipWithAsyncParallel mapping source1 source2

Parameters:
Returns: AsyncSeq<'U>

Combines two asynchronous sequences using the specified function. The values from sequences are retrieved in parallel. The resulting sequence stops when either of the argument sequences stop.

mapping : 'T1 -> 'T2 -> Async<'U>
source1 : AsyncSeq<'T1>
source2 : AsyncSeq<'T2>
Returns: AsyncSeq<'U>

AsyncSeq.zipWithParallel mapping source1 source2

Full Usage: AsyncSeq.zipWithParallel mapping source1 source2

Parameters:
Returns: AsyncSeq<'U>

Combines two asynchronous sequences using the specified function. The values from sequences are retrieved in parallel. The resulting sequence stops when either of the argument sequences stop.

mapping : 'T1 -> 'T2 -> 'U
source1 : AsyncSeq<'T1>
source2 : AsyncSeq<'T2>
Returns: AsyncSeq<'U>

Type something to start searching.