FSharpPlus


Async Module

Additional operations on Async

Functions and values

Function or value Description

Async.apply f x

Full Usage: Async.apply f x

Parameters:
    f : Async<('a -> 'b)> - Async workflow returning a function.
    x : Async<'a> - Async workflow returning a value.

Returns: Async<'b>

Creates an async workflow that is the result of applying the resulting function of an async workflow to the resulting value of another async workflow.

f : Async<('a -> 'b)>

Async workflow returning a function.

x : Async<'a>

Async workflow returning a value.

Returns: Async<'b>

Async.join x

Full Usage: Async.join x

Parameters:
Returns: Async<'a>

Flatten two nested asyncs into one.

x : Async<Async<'a>>
Returns: Async<'a>

Async.map f x

Full Usage: Async.map f x

Parameters:
    f : 'a -> 'b
    x : Async<'a>

Returns: Async<'b>

Creates an async workflow from another workflow 'x', mapping its result with 'f'.

f : 'a -> 'b
x : Async<'a>
Returns: Async<'b>

Async.map2 f x y

Full Usage: Async.map2 f x y

Parameters:
    f : 'a -> 'b -> 'c - The mapping function.
    x : Async<'a> - First async workflow.
    y : Async<'b> - Second async workflow.

Returns: Async<'c>

Creates an async workflow from two workflows 'x' and 'y', mapping its results with 'f'.

Workflows are run in sequence.

f : 'a -> 'b -> 'c

The mapping function.

x : Async<'a>

First async workflow.

y : Async<'b>

Second async workflow.

Returns: Async<'c>

Async.map3 f x y z

Full Usage: Async.map3 f x y z

Parameters:
    f : 'e -> 'f -> 'g -> 'h - The mapping function.
    x : Async<'e> - First async workflow.
    y : Async<'f> - Second async workflow.
    z : Async<'g> - third async workflow.

Returns: Async<'h>

Creates an async workflow from three workflows 'x', 'y' and 'z', mapping its results with 'f'.

Workflows are run in sequence.

f : 'e -> 'f -> 'g -> 'h

The mapping function.

x : Async<'e>

First async workflow.

y : Async<'f>

Second async workflow.

z : Async<'g>

third async workflow.

Returns: Async<'h>

Async.raise ex

Full Usage: Async.raise ex

Parameters:
    ex : exn

Returns: Async<'T>

Raises an exception in the async workflow

ex : exn
Returns: Async<'T>

Async.zip x y

Full Usage: Async.zip x y

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

Creates an async workflow from two workflows 'x' and 'y', tupling its results.

x : Async<'a>
y : Async<'b>
Returns: Async<'a * 'b>