Header menu logo FSharp.Control.TaskSeq

TaskSeq Module

Functions and values

Function or value Description

average source

Full Usage: average source

Parameters:
    source : TaskSeq<^T> - The input task sequence.

Returns: Task<^T> The average of the elements in the sequence.
Modifiers: inline
Type parameters: ^T

Returns the average of all elements of the task sequence. The elements must support the + operator and DivideByInt, which is the case for all built-in F# floating-point types. For sequences with a projection, consider using averageBy.

source : TaskSeq<^T>

The input task sequence.

Returns: Task<^T>

The average of the elements in the sequence.

ArgumentNullException Thrown when the input task sequence is null.
ArgumentException Thrown when the input task sequence is empty.

averageBy projection source

Full Usage: averageBy projection source

Parameters:
    projection : 'T -> ^U - A function to transform items from the input sequence into averageable values.
    source : TaskSeq<'T> - The input task sequence.

Returns: Task<^U> The average of the projected values.
Modifiers: inline
Type parameters: 'T, ^U

Returns the average of the results generated by applying the projection function to each element of the task sequence. The result type must support the + operator and DivideByInt, which is the case for all built-in F# floating-point types. If projection is asynchronous, consider using averageByAsync.

projection : 'T -> ^U

A function to transform items from the input sequence into averageable values.

source : TaskSeq<'T>

The input task sequence.

Returns: Task<^U>

The average of the projected values.

ArgumentNullException Thrown when the input task sequence is null.
ArgumentException Thrown when the input task sequence is empty.

averageByAsync projection source

Full Usage: averageByAsync projection source

Parameters:
    projection : 'T -> Task<^U> - An async function to transform items from the input sequence into averageable values.
    source : TaskSeq<'T> - The input task sequence.

Returns: Task<^U> The average of the projected values.
Modifiers: inline
Type parameters: 'T, ^U

Returns the average of the results generated by applying the asynchronous projection function to each element of the task sequence. The result type must support the + operator and DivideByInt, which is the case for all built-in F# floating-point types. If projection is synchronous, consider using averageBy.

projection : 'T -> Task<^U>

An async function to transform items from the input sequence into averageable values.

source : TaskSeq<'T>

The input task sequence.

Returns: Task<^U>

The average of the projected values.

ArgumentNullException Thrown when the input task sequence is null.
ArgumentException Thrown when the input task sequence is empty.

empty

Full Usage: empty

Returns: TaskSeq<'T>

Initialize an empty task sequence.

Returns: TaskSeq<'T>

sum source

Full Usage: sum source

Parameters:
    source : TaskSeq<^T> - The input task sequence.

Returns: Task<^T> The sum of all elements in the sequence, starting from Unchecked.defaultof as zero.
Modifiers: inline
Type parameters: ^T

Returns the sum of all elements of the task sequence. The elements must support the + operator, which is the case for all built-in numeric types. For sequences with a projection, use sumBy.

source : TaskSeq<^T>

The input task sequence.

Returns: Task<^T>

The sum of all elements in the sequence, starting from Unchecked.defaultof as zero.

ArgumentNullException Thrown when the input task sequence is null.

sumBy projection source

Full Usage: sumBy projection source

Parameters:
    projection : 'T -> ^U - A function to transform items from the input sequence into summable values.
    source : TaskSeq<'T> - The input task sequence.

Returns: Task<^U> The sum of the projected values.
Modifiers: inline
Type parameters: 'T, ^U

Returns the sum of the results generated by applying the projection function to each element of the task sequence. The result type must support the + operator, which is the case for all built-in numeric types. If projection is asynchronous, consider using sumByAsync.

projection : 'T -> ^U

A function to transform items from the input sequence into summable values.

source : TaskSeq<'T>

The input task sequence.

Returns: Task<^U>

The sum of the projected values.

ArgumentNullException Thrown when the input task sequence is null.

sumByAsync projection source

Full Usage: sumByAsync projection source

Parameters:
    projection : 'T -> Task<^U> - An async function to transform items from the input sequence into summable values.
    source : TaskSeq<'T> - The input task sequence.

Returns: Task<^U> The sum of the projected values.
Modifiers: inline
Type parameters: 'T, ^U

Returns the sum of the results generated by applying the asynchronous projection function to each element of the task sequence. The result type must support the + operator, which is the case for all built-in numeric types. If projection is synchronous, consider using sumBy.

projection : 'T -> Task<^U>

An async function to transform items from the input sequence into summable values.

source : TaskSeq<'T>

The input task sequence.

Returns: Task<^U>

The sum of the projected values.

ArgumentNullException Thrown when the input task sequence is null.

Type something to start searching.