FSharpPlus


Free Module

Namespace: FSharpPlus.Data

Assembly: FSharpPlus.dll

Basic operations on Free Monads

Functions and values

Function or value Description

Free.apply f x

Full Usage: Free.apply f x

Parameters:
    f : Free<^Functor<'T->'U>, ('T -> 'U)>
    x : Free<^Functor<'T>, 'T>

Returns: Free<^Functor<'U>, 'U>

f : Free<^Functor<'T->'U>, ('T -> 'U)>
x : Free<^Functor<'T>, 'T>
Returns: Free<^Functor<'U>, 'U>

Free.bind f x

Full Usage: Free.bind f x

Parameters:
    f : 'T -> Free<^Functor<'U>, 'U>
    x : Free<^Functor<'T>, 'T>

Returns: Free<^Functor<'U>, 'U>

f : 'T -> Free<^Functor<'U>, 'U>
x : Free<^Functor<'T>, 'T>
Returns: Free<^Functor<'U>, 'U>

Free.fold f x

Full Usage: Free.fold f x

Parameters:
    f : ^Functor<'T> -> ^Monad<'T>
    x : Free<^Functor<'U>, 'U>

Returns: ^Monad<'U>

Folds the Free structure into a Monad

f : ^Functor<'T> -> ^Monad<'T>
x : Free<^Functor<'U>, 'U>
Returns: ^Monad<'U>

Free.iterM f x

Full Usage: Free.iterM f x

Parameters:
    f : ^Functor<'Monad<'T>> -> ^Monad<'T>
    x : Free<^Functor<'T>, 'T>

Returns: ^Monad<'T>

Tear down a Free monad using iteration.

f : ^Functor<'Monad<'T>> -> ^Monad<'T>
x : Free<^Functor<'T>, 'T>
Returns: ^Monad<'T>

Free.liftF x

Full Usage: Free.liftF x

Parameters:
    x : ^Functor<'T>

Returns: Free<^Functor<'T>, 'T>

Lift any Functor into a Free structure

x : ^Functor<'T>
Returns: Free<^Functor<'T>, 'T>

Free.map f x

Full Usage: Free.map f x

Parameters:
    f : 'T -> 'U
    x : Free<^Functor<'T>, 'T>

Returns: Free<^Functor<'U>, 'U>

f : 'T -> 'U
x : Free<^Functor<'T>, 'T>
Returns: Free<^Functor<'U>, 'U>

Free.map2 f x y

Full Usage: Free.map2 f x y

Parameters:
    f : 'T -> 'U -> 'V
    x : Free<^Functor<'T>, 'T>
    y : Free<^Functor<'U>, 'U>

Returns: Free<^Functor<'V>, 'V>

f : 'T -> 'U -> 'V
x : Free<^Functor<'T>, 'T>
y : Free<^Functor<'U>, 'U>
Returns: Free<^Functor<'V>, 'V>

Free.run f

Full Usage: Free.run f

Parameters:
    f : Free<^Functor<'T>, 'T>

Returns: Choice<'T, ^Functor,'T>>>

f : Free<^Functor<'T>, 'T>
Returns: Choice<'T, ^Functor,'T>>>