FSharpPlus


StateT Module

Basic operations on StateT

Functions and values

Function or value Description

StateT.apply arg1 arg2

Full Usage: StateT.apply arg1 arg2

Parameters:
    arg0 : StateT<'S, ^Monad<('T->'U)*'S>>
    arg1 : StateT<'S, ^Monad<'T*'S>>

Returns: StateT<'S, ^Monad<'U*'S>>
Modifiers: inline
Type parameters: 'S, ^Monad<('T -> 'U) * 'S>, ^Monad<'U * 'S>, 'T, 'U, ^Monad<'T * 'S>
arg0 : StateT<'S, ^Monad<('T->'U)*'S>>
arg1 : StateT<'S, ^Monad<'T*'S>>
Returns: StateT<'S, ^Monad<'U*'S>>

StateT.bind f arg2

Full Usage: StateT.bind f arg2

Parameters:
    f : 'T -> StateT<'S, ^Monad<'U*'S>>
    arg1 : StateT<'S, ^Monad<'T*'S>>

Returns: StateT<'S, ^Monad<'U*'S>>
Modifiers: inline
Type parameters: 'T, 'S, ^Monad<'U * 'S>, ^Monad<'T * 'S>
f : 'T -> StateT<'S, ^Monad<'U*'S>>
arg1 : StateT<'S, ^Monad<'T*'S>>
Returns: StateT<'S, ^Monad<'U*'S>>

StateT.hoist x

Full Usage: StateT.hoist x

Parameters:
Returns: StateT<'S, ^Monad<'T*'S>>
Modifiers: inline
Type parameters: 'S, 'T, ^Monad<'T * 'S>

Transform a State<'S, 'T> to a StateT<'S, '``Monad<'T * 'S>``>

x : State<'S, 'T>
Returns: StateT<'S, ^Monad<'T*'S>>

StateT.lift m

Full Usage: StateT.lift m

Parameters:
    m : ^Monad<'T>

Returns: StateT<'S, ^Monad<'T*'S>>
Modifiers: inline

Embed a Monad<'T> into a StateT<'S,'``Monad<'T * 'S>``>

m : ^Monad<'T>
Returns: StateT<'S, ^Monad<'T*'S>>

StateT.map f arg2

Full Usage: StateT.map f arg2

Parameters:
    f : 'T -> 'U
    arg1 : StateT<'S, ^Monad<'T*'S>>

Returns: StateT<'S, ^Monad<'U*'S>>
Modifiers: inline
f : 'T -> 'U
arg1 : StateT<'S, ^Monad<'T*'S>>
Returns: StateT<'S, ^Monad<'U*'S>>

StateT.map2 f arg2 arg3

Full Usage: StateT.map2 f arg2 arg3

Parameters:
    f : 'T -> 'U -> 'V
    arg1 : StateT<'S, ^Monad<'T*'S>>
    arg2 : StateT<'S, ^Monad<'U*'S>>

Returns: StateT<'S, ^Monad<'V*'S>>
Modifiers: inline
Type parameters: 'T, 'U, 'V, 'S, ^Monad<'T * 'S>, ^Monad<'V * 'S>, ^Monad<'U * 'S>

Combines two StateTs into one by applying a mapping function.

f : 'T -> 'U -> 'V
arg1 : StateT<'S, ^Monad<'T*'S>>
arg2 : StateT<'S, ^Monad<'U*'S>>
Returns: StateT<'S, ^Monad<'V*'S>>

StateT.map3 f arg2 arg3 arg4

Full Usage: StateT.map3 f arg2 arg3 arg4

Parameters:
    f : 'T -> 'U -> 'V -> 'W
    arg1 : StateT<'S, ^Monad<'T*'S>>
    arg2 : StateT<'S, ^Monad<'U*'S>>
    arg3 : StateT<'S, ^Monad<'V*'S>>

Returns: StateT<'S, ^Monad<'W*'S>>
Modifiers: inline

Combines three StateTs into one by applying a mapping function.

f : 'T -> 'U -> 'V -> 'W
arg1 : StateT<'S, ^Monad<'T*'S>>
arg2 : StateT<'S, ^Monad<'U*'S>>
arg3 : StateT<'S, ^Monad<'V*'S>>
Returns: StateT<'S, ^Monad<'W*'S>>

StateT.run arg1

Full Usage: StateT.run arg1

Parameters:
    arg0 : StateT<'S, 'Monad<'T*'S>>

Returns: 'S -> 'Monad<'T*'S>

Runs the state with an inital state to get back the result and the new state wrapped in an inner monad.

arg0 : StateT<'S, 'Monad<'T*'S>>
Returns: 'S -> 'Monad<'T*'S>

StateT.zip x y

Full Usage: StateT.zip x y

Parameters:
    x : StateT<'S, ^Monad<'T*'S>>
    y : StateT<'S, ^Monad<'U*'S>>

Returns: StateT<'S, ^Monad<('T*'U)*'S>>
Modifiers: inline

Zips two StateTs into one.

x : StateT<'S, ^Monad<'T*'S>>
y : StateT<'S, ^Monad<'U*'S>>
Returns: StateT<'S, ^Monad<('T*'U)*'S>>