FSharpPlus


Cont<'r, 't> Type

Computation type: Computations which can be interrupted and resumed.

Binding strategy: Binding a function to a monadic value creates a new continuation which uses the function as the continuation of the monadic computation.

Useful for: Complex control structures, error handling, and creating co-routines.

Table of contents

Functor

Static members

Static member Description

f <!> x

Full Usage: f <!> x

Parameters:
    f : 'T -> 'U
    x : Cont<'R, 'T>

Returns: Cont<'R, 'U>

Lifts a function into a Cont. Same as map. To be used in Applicative Style expressions, combined with <*>

f : 'T -> 'U
x : Cont<'R, 'T>
Returns: Cont<'R, 'U>

Applicative

Static members

Static member Description

x *> y

Full Usage: x *> y

Parameters:
Returns: Cont<'R, 'U>

Sequences two Conts left-to-right, discarding the value of the first argument.

x : Cont<'R, 'T>
y : Cont<'R, 'U>
Returns: Cont<'R, 'U>

x <* y

Full Usage: x <* y

Parameters:
Returns: Cont<'R, 'U>

Sequences two Conts left-to-right, discarding the value of the second argument.

x : Cont<'R, 'U>
y : Cont<'R, 'T>
Returns: Cont<'R, 'U>

Monad

Static members

Static member Description

f >=> g

Full Usage: f >=> g

Parameters:
    f : 'T -> Cont<'R, 'U>
    g : 'U -> Cont<'R, 'V>

Returns: 'T -> Cont<'R, 'V>

Composes left-to-right two Cont functions (Kleisli composition).

f : 'T -> Cont<'R, 'U>
g : 'U -> Cont<'R, 'V>
Returns: 'T -> Cont<'R, 'V>

Other module members

Union cases

Union case Description

Cont ('t -> 'r) -> 'r

Full Usage: Cont ('t -> 'r) -> 'r

Parameters:
    Item : ('t -> 'r) -> 'r

Item : ('t -> 'r) -> 'r

Static members

Static member Description

f <*> x

Full Usage: f <*> x

Parameters:
    f : Cont<'R, ('T -> 'U)>
    x : Cont<'R, 'T>

Returns: Cont<'R, 'U>
f : Cont<'R, ('T -> 'U)>
x : Cont<'R, 'T>
Returns: Cont<'R, 'U>

x >>= f

Full Usage: x >>= f

Parameters:
    x : Cont<'R, 'T>
    f : 'T -> Cont<'R, 'U>

Returns: Cont<'R, 'U>
x : Cont<'R, 'T>
f : 'T -> Cont<'R, 'U>
Returns: Cont<'R, 'U>

Cont.CallCC(f)

Full Usage: Cont.CallCC(f)

Parameters:
    f : ('T -> Cont<'R, 'U>) -> Cont<'R, 'T>

Returns: Cont<'R, 'T>
f : ('T -> Cont<'R, 'U>) -> Cont<'R, 'T>
Returns: Cont<'R, 'T>

Cont.Delay(f)

Full Usage: Cont.Delay(f)

Parameters:
    f : unit -> Cont<'R, 'T>

Returns: Cont<'R, 'T>
f : unit -> Cont<'R, 'T>
Returns: Cont<'R, 'T>

Cont.Lift(m)

Full Usage: Cont.Lift(m)

Parameters:
    m : ^Monad<'T>

Returns: ContT<^Monad<'R>, 'T>
Modifiers: inline
Type parameters: 'T
m : ^Monad<'T>
Returns: ContT<^Monad<'R>, 'T>

Cont.Lift2(f, x, y)

Full Usage: Cont.Lift2(f, x, y)

Parameters:
    f : 'T -> 'U -> 'V
    x : Cont<'R, 'T>
    y : Cont<'R, 'U>

Returns: Cont<'R, 'V>
Modifiers: inline
Type parameters: 'V, 'R
f : 'T -> 'U -> 'V
x : Cont<'R, 'T>
y : Cont<'R, 'U>
Returns: Cont<'R, 'V>

Cont.Lift3(f, x, y, z)

Full Usage: Cont.Lift3(f, x, y, z)

Parameters:
    f : 'T -> 'U -> 'V -> 'W
    x : Cont<'R, 'T>
    y : Cont<'R, 'U>
    z : Cont<'R, 'V>

Returns: Cont<'R, 'W>
Modifiers: inline
Type parameters: 'V, 'W, 'R
f : 'T -> 'U -> 'V -> 'W
x : Cont<'R, 'T>
y : Cont<'R, 'U>
z : Cont<'R, 'V>
Returns: Cont<'R, 'W>

Cont.LiftAsync(x)

Full Usage: Cont.LiftAsync(x)

Parameters:
Returns: ContT<Async<'R>, 'T>
Modifiers: inline
x : Async<'T>
Returns: ContT<Async<'R>, 'T>

Cont.Local(arg1, f)

Full Usage: Cont.Local(arg1, f)

Parameters:
    arg0 : Cont<^a, 'MonadReader,'U>
    f : 'R1 -> 'R2

Returns: ContT<^b, 'MonadReader,'U>
Modifiers: inline
arg0 : Cont<^a, 'MonadReader,'U>
f : 'R1 -> 'R2
Returns: ContT<^b, 'MonadReader,'U>

Cont.Map(x, f)

Full Usage: Cont.Map(x, f)

Parameters:
    x : Cont<'R, 'T>
    f : 'T -> 'U

Returns: Cont<'R, 'U>
x : Cont<'R, 'T>
f : 'T -> 'U
Returns: Cont<'R, 'U>

Cont.Put(x)

Full Usage: Cont.Put(x)

Parameters:
    x : 'S

Returns: ^ContT<'MonadState<'S,'T>,unit>
Modifiers: inline
x : 'S
Returns: ^ContT<'MonadState<'S,'T>,unit>

Cont.Return(n)

Full Usage: Cont.Return(n)

Parameters:
    n : 'T

Returns: Cont<'R, 'T>
n : 'T
Returns: Cont<'R, 'T>

Cont.TryFinally(arg1, h)

Full Usage: Cont.TryFinally(arg1, h)

Parameters:
    arg0 : Cont<'R, 'T>
    h : unit -> unit

Returns: Cont<'R, 'T>
arg0 : Cont<'R, 'T>
h : unit -> unit
Returns: Cont<'R, 'T>

Cont.TryWith(arg1, h)

Full Usage: Cont.TryWith(arg1, h)

Parameters:
    arg0 : Cont<'R, 'T>
    h : exn -> Cont<'R, 'T>

Returns: Cont<'R, 'T>
arg0 : Cont<'R, 'T>
h : exn -> Cont<'R, 'T>
Returns: Cont<'R, 'T>

Cont.Using(resource, f)

Full Usage: Cont.Using(resource, f)

Parameters:
    resource : 'a
    f : 'a -> Cont<'R, 'T>

Returns: Cont<'R, 'T>
resource : 'a
f : 'a -> Cont<'R, 'T>
Returns: Cont<'R, 'T>

Cont.get_Ask ()

Full Usage: Cont.get_Ask ()

Returns: ^ContT<'MonadReader<'R,'T>,'R>
Modifiers: inline
Returns: ^ContT<'MonadReader<'R,'T>,'R>

Cont.get_Get ()

Full Usage: Cont.get_Get ()

Returns: ^ContT<'MonadState<'S,'T>,'S>
Modifiers: inline
Returns: ^ContT<'MonadState<'S,'T>,'S>