FSharpPlus


Writer Module

Basic operations on Writer

Functions and values

Function or value Description

Writer.apply arg1 arg2

Full Usage: Writer.apply arg1 arg2

Parameters:
    arg0 : Writer<^Monoid, ('T -> 'U)>
    arg1 : Writer<^Monoid, 'T>

Returns: Writer<^Monoid, 'U>
Modifiers: inline
Type parameters: ^Monoid, 'T, 'U
arg0 : Writer<^Monoid, ('T -> 'U)>
arg1 : Writer<^Monoid, 'T>
Returns: Writer<^Monoid, 'U>

Writer.bind f arg2

Full Usage: Writer.bind f arg2

Parameters:
Returns: Writer<^Monoid, 'U>
Modifiers: inline
Type parameters: 'T, ^Monoid, 'U
f : 'T -> Writer<^Monoid, 'U>
arg1 : Writer<^Monoid, 'T>
Returns: Writer<^Monoid, 'U>

Writer.exec arg1

Full Usage: Writer.exec arg1

Parameters:
Returns: 'Monoid

Extract the output from a writer computation.

arg0 : Writer<'Monoid, 'T>
Returns: 'Monoid

Writer.listen m

Full Usage: Writer.listen m

Parameters:
    m : Writer<'Monoid, 'T> - The action to be executed.

Returns: Writer<'Monoid, ('T * 'Monoid)>

An action that executes the action m and adds its output to the value of the computation.

m : Writer<'Monoid, 'T>

The action to be executed.

Returns: Writer<'Monoid, ('T * 'Monoid)>

Writer.map f arg2

Full Usage: Writer.map f arg2

Parameters:
    f : 'T -> 'U
    arg1 : Writer<'Monoid, 'T>

Returns: Writer<'Monoid, 'U>
f : 'T -> 'U
arg1 : Writer<'Monoid, 'T>
Returns: Writer<'Monoid, 'U>

Writer.map2 f arg2 arg3

Full Usage: Writer.map2 f arg2 arg3

Parameters:
    f : 'T -> 'U -> 'V
    arg1 : Writer<^Monoid, 'T>
    arg2 : Writer<^Monoid, 'U>

Returns: Writer<^Monoid, 'V>
Modifiers: inline
Type parameters: 'T, 'U, 'V, ^Monoid

Combines two Writers into one by applying a mapping function.

f : 'T -> 'U -> 'V
arg1 : Writer<^Monoid, 'T>
arg2 : Writer<^Monoid, 'U>
Returns: Writer<^Monoid, 'V>

Writer.map3 f arg2 arg3 arg4

Full Usage: Writer.map3 f arg2 arg3 arg4

Parameters:
    f : 'T -> 'U -> 'V -> 'W
    arg1 : Writer<^Monoid, 'T>
    arg2 : Writer<^Monoid, 'U>
    arg3 : Writer<^Monoid, 'V>

Returns: Writer<^Monoid, 'W>
Modifiers: inline
Type parameters: 'T, 'U, 'V, 'W, ^Monoid

Combines three Writers into one by applying a mapping function.

f : 'T -> 'U -> 'V -> 'W
arg1 : Writer<^Monoid, 'T>
arg2 : Writer<^Monoid, 'U>
arg3 : Writer<^Monoid, 'V>
Returns: Writer<^Monoid, 'W>

Writer.pass m

Full Usage: Writer.pass m

Parameters:
    m : Writer<'Monoid, ('T * ('Monoid -> 'Monoid))>

Returns: Writer<'Monoid, 'T>

Action that executes the action m, which returns a value and a function, and returns the value, applying the function to the output.

m : Writer<'Monoid, ('T * ('Monoid -> 'Monoid))>
Returns: Writer<'Monoid, 'T>

Writer.run arg1

Full Usage: Writer.run arg1

Parameters:
Returns: 'T * 'Monoid

Unwraps a writer computation as a (result, output) pair. (The inverse of Writer.)

arg0 : Writer<'Monoid, 'T>
Returns: 'T * 'Monoid

Writer.tell w

Full Usage: Writer.tell w

Parameters:
    w : 'Monoid

Returns: Writer<'Monoid, unit>

Embeds a simple writer action.

w : 'Monoid
Returns: Writer<'Monoid, unit>