FSharpx.Extras


Continuation Module

Types

Type Description

ContinuationBuilder

Functions and values

Function or value Description

x *> y

Full Usage: x *> y

Parameters:
Returns: Cont<'c, 'b>
Modifiers: inline

Sequence actions, discarding the value of the first argument.

x : Cont<'a, 'b>
y : Cont<'c, 'b>
Returns: Cont<'c, 'b>

x <* y

Full Usage: x <* y

Parameters:
Returns: Cont<'a, 'b>
Modifiers: inline

Sequence actions, discarding the value of the second argument.

x : Cont<'a, 'b>
y : Cont<'c, 'b>
Returns: Cont<'a, 'b>

f <!> m

Full Usage: f <!> m

Parameters:
    f : 'a -> 'b
    m : Cont<'a, 'c>

Returns: Cont<'b, 'c>
Modifiers: inline

Infix map

f : 'a -> 'b
m : Cont<'a, 'c>
Returns: Cont<'b, 'c>

f <*> m

Full Usage: f <*> m

Parameters:
    f : Cont<('a -> 'b), 'c>
    m : Cont<'a, 'c>

Returns: Cont<'b, 'c>
Modifiers: inline

Sequential application

f : Cont<('a -> 'b), 'c>
m : Cont<'a, 'c>
Returns: Cont<'b, 'c>

<=<x

Full Usage: <=<x

Parameters:
    x : 'a -> Cont<'b, 'c>

Returns: ('d -> Cont<'a, 'c>) -> 'd -> Cont<'b, 'c>
Modifiers: inline

Right-to-left Kleisli composition

x : 'a -> Cont<'b, 'c>
Returns: ('d -> Cont<'a, 'c>) -> 'd -> Cont<'b, 'c>

f =<< m

Full Usage: f =<< m

Parameters:
    f : 'a -> Cont<'b, 'c>
    m : Cont<'a, 'c>

Returns: Cont<'b, 'c>
Modifiers: inline

Flipped >>=

f : 'a -> Cont<'b, 'c>
m : Cont<'a, 'c>
Returns: Cont<'b, 'c>

(>=>) f g x

Full Usage: (>=>) f g x

Parameters:
    f : 'a -> Cont<'b, 'c>
    g : 'b -> Cont<'d, 'c>
    x : 'a

Returns: Cont<'d, 'c>
Modifiers: inline

Left-to-right Kleisli composition

f : 'a -> Cont<'b, 'c>
g : 'b -> Cont<'d, 'c>
x : 'a
Returns: Cont<'d, 'c>

m >>. f

Full Usage: m >>. f

Parameters:
Returns: Cont<'c, 'b>
Modifiers: inline

Sequentially compose two continuation actions, discarding any value produced by the first

m : Cont<'a, 'b>
f : Cont<'c, 'b>
Returns: Cont<'c, 'b>

m >>= f

Full Usage: m >>= f

Parameters:
    m : Cont<'a, 'b>
    f : 'a -> Cont<'c, 'b>

Returns: Cont<'c, 'b>
Modifiers: inline

Sequentially compose two actions, passing any value produced by the first as an argument to the second.

m : Cont<'a, 'b>
f : 'a -> Cont<'c, 'b>
Returns: Cont<'c, 'b>

ap m f

Full Usage: ap m f

Parameters:
    m : Cont<'a, 'b>
    f : Cont<('a -> 'c), 'b>

Returns: Cont<'c, 'b>
Modifiers: inline

Sequential application

m : Cont<'a, 'b>
f : Cont<('a -> 'c), 'b>
Returns: Cont<'c, 'b>

bind f comp1 cont econt

Full Usage: bind f comp1 cont econt

Parameters:
    f : 'a -> Cont<'b, 'c>
    comp1 : Cont<'a, 'c>
    cont : 'b -> 'c
    econt : exn -> 'c

Returns: 'c
f : 'a -> Cont<'b, 'c>
comp1 : Cont<'a, 'c>
cont : 'b -> 'c
econt : exn -> 'c
Returns: 'c

callcc f cont econt

Full Usage: callcc f cont econt

Parameters:
    f : ('T -> Cont<'b, 'r>) -> Cont<'T, 'r>
    cont : 'T -> 'r
    econt : exn -> 'r

Returns: 'r
f : ('T -> Cont<'b, 'r>) -> Cont<'T, 'r>
cont : 'T -> 'r
econt : exn -> 'r
Returns: 'r

cont

Full Usage: cont

Returns: ContinuationBuilder
Returns: ContinuationBuilder

foldM f s

Full Usage: foldM f s

Parameters:
    f : 'a -> 'b -> Cont<'a, 'c>
    s : 'a

Returns: 'b seq -> Cont<'a, 'c>
f : 'a -> 'b -> Cont<'a, 'c>
s : 'a
Returns: 'b seq -> Cont<'a, 'c>

lift2 f a b

Full Usage: lift2 f a b

Parameters:
    f : 'a -> 'b -> 'c
    a : Cont<'a, 'd>
    b : Cont<'b, 'd>

Returns: Cont<'c, 'd>
Modifiers: inline

Promote a function to a monad/applicative, scanning the monadic/applicative arguments from left to right.

f : 'a -> 'b -> 'c
a : Cont<'a, 'd>
b : Cont<'b, 'd>
Returns: Cont<'c, 'd>

map f m

Full Usage: map f m

Parameters:
    f : 'a -> 'b
    m : Cont<'a, 'c>

Returns: Cont<'b, 'c>
Modifiers: inline

Transforms a Cont value by using a specified mapping function.

f : 'a -> 'b
m : Cont<'a, 'c>
Returns: Cont<'b, 'c>

mapM f x

Full Usage: mapM f x

Parameters:
    f : 'a -> Cont<'b, 'c>
    x : 'a list

Returns: Cont<'b list, 'c>
Modifiers: inline
f : 'a -> Cont<'b, 'c>
x : 'a list
Returns: Cont<'b list, 'c>

returnM x

Full Usage: returnM x

Parameters:
    x : 'a

Returns: Cont<'a, 'b>
Modifiers: inline

Inject a value into the Cont type

x : 'a
Returns: Cont<'a, 'b>

runCont c cont econt

Full Usage: runCont c cont econt

Parameters:
    c : Cont<'a, 'b>
    cont : 'a -> 'b
    econt : exn -> 'b

Returns: 'b
c : Cont<'a, 'b>
cont : 'a -> 'b
econt : exn -> 'b
Returns: 'b

sequence s

Full Usage: sequence s

Parameters:
    s : Cont<'a, 'b> list

Returns: Cont<'a list, 'b>
Modifiers: inline
s : Cont<'a, 'b> list
Returns: Cont<'a list, 'b>

throw exn cont econt

Full Usage: throw exn cont econt

Parameters:
    exn : exn
    cont : 'T -> 'r
    econt : exn -> 'r

Returns: 'r
exn : exn
cont : 'T -> 'r
econt : exn -> 'r
Returns: 'r