Header menu logo IcedTasks

ValueTask Module

Contains a set of standard functional helper function

Functions and values

Function or value Description

ValueTask.apply applicable cTask

Full Usage: ValueTask.apply applicable cTask

Parameters:
    applicable : ValueTask<('input -> 'output)> - A function wrapped in a ValueTasks
    cTask : ValueTask<'input> - The value.

Returns: ValueTask<'output> The result of the applicable.
Modifiers: inline
Type parameters: 'input, 'output

Allows chaining of ValueTasks.

applicable : ValueTask<('input -> 'output)>

A function wrapped in a ValueTasks

cTask : ValueTask<'input>

The value.

Returns: ValueTask<'output>

The result of the applicable.

ValueTask.bind binder cTask

Full Usage: ValueTask.bind binder cTask

Parameters:
    binder : 'input -> ValueTask<'output> - The continuation.
    cTask : ValueTask<'input> - The value.

Returns: ValueTask<'output> The result of the binder.
Modifiers: inline
Type parameters: 'input, 'output

Allows chaining of ValueTasks.

binder : 'input -> ValueTask<'output>

The continuation.

cTask : ValueTask<'input>

The value.

Returns: ValueTask<'output>

The result of the binder.

ValueTask.map mapper cTask

Full Usage: ValueTask.map mapper cTask

Parameters:
    mapper : 'input -> 'output - The continuation.
    cTask : ValueTask<'input> - The value.

Returns: ValueTask<'output> The result of the mapper wrapped in a ValueTasks.
Modifiers: inline
Type parameters: 'input, 'output

Allows chaining of ValueTasks.

mapper : 'input -> 'output

The continuation.

cTask : ValueTask<'input>

The value.

Returns: ValueTask<'output>

The result of the mapper wrapped in a ValueTasks.

ValueTask.ofTask task

Full Usage: ValueTask.ofTask task

Parameters:
    task : Task<'T> - The task.

Returns: ValueTask<'T>
Modifiers: inline
Type parameters: 'T

Initializes a new instance of the System.Threading.Tasks.ValueTask class using the supplied task that represents the operation.

task : Task<'T>

The task.

Returns: ValueTask<'T>

ValueTask.ofTaskUnit task

Full Usage: ValueTask.ofTaskUnit task

Parameters:
    task : Task - The task that represents the operation

Returns: ValueTask
Modifiers: inline

Initializes a new instance of the System.Threading.Tasks.ValueTask class using the supplied task that represents the operation.

task : Task

The task that represents the operation

Returns: ValueTask

ValueTask.ofUnit vtask

Full Usage: ValueTask.ofUnit vtask

Parameters:
Returns: ValueTask<unit>
Modifiers: inline
vtask : ValueTask
Returns: ValueTask<unit>

ValueTask.singleton item

Full Usage: ValueTask.singleton item

Parameters:
    item : 'item - The item to be the result of the ValueTask.

Returns: ValueTask<'item> A ValueTask with the item as the result.
Modifiers: inline
Type parameters: 'item

Lifts an item to a ValueTask.

item : 'item

The item to be the result of the ValueTask.

Returns: ValueTask<'item>

A ValueTask with the item as the result.

ValueTask.toTask vtask

Full Usage: ValueTask.toTask vtask

Parameters:
Returns: Task<'T> The System.Threading.Tasks.Task object that is wrapped in this System.Threading.Tasks.ValueTask if one exists, or a new System.Threading.Tasks.Task object that represents the result.
Modifiers: inline
Type parameters: 'T

Retrieves a System.Threading.Tasks.Task object that represents this System.Threading.Tasks.ValueTask`1

vtask : ValueTask<'T>

Returns: Task<'T>

The System.Threading.Tasks.Task object that is wrapped in this System.Threading.Tasks.ValueTask if one exists, or a new System.Threading.Tasks.Task object that represents the result.

ValueTask.toTaskUnit vtask

Full Usage: ValueTask.toTaskUnit vtask

Parameters:
Returns: Task
Modifiers: inline

Retrieves a System.Threading.Tasks.Task object that represents this System.Threading.Tasks.ValueTask.

vtask : ValueTask
Returns: Task

ValueTask.toUnit vtask

Full Usage: ValueTask.toUnit vtask

Parameters:
Returns: ValueTask
Modifiers: inline
Type parameters: 'T

Converts a ValueTask to its non-generic counterpart.

vtask : ValueTask<'T>

Returns: ValueTask

ValueTask.zip left right

Full Usage: ValueTask.zip left right

Parameters:
Returns: ValueTask<'left * 'right> A tuple of the parameters passed in
Modifiers: inline
Type parameters: 'left, 'right

Takes two ValueTasks, starts them serially in order of left to right, and returns a tuple of the pair.

left : ValueTask<'left>

The left value.

right : ValueTask<'right>

The right value.

Returns: ValueTask<'left * 'right>

A tuple of the parameters passed in

Type something to start searching.