FSharpPlus


Writer<'monoid, 't> Type

Computation type: Computations which produce a stream of data in addition to the computed values.

Binding strategy: Combines the outputs of the subcomputations using mappend.

Useful for: Logging, or other computations that produce output "on the side".

Table of contents

Functor

Static members

Static member Description

f <!> x

Full Usage: f <!> x

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

Returns: Writer<'Monoid, 'U>

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

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

Applicative

Static members

Static member Description

x *> y

Full Usage: x *> y

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

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

x : Writer<^Monoid, 'T>
y : Writer<^Monoid, 'U>
Returns: Writer<^Monoid, 'U>

x <* y

Full Usage: x <* y

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

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

x : Writer<^Monoid, 'U>
y : Writer<^Monoid, 'T>
Returns: Writer<^Monoid, 'U>

Monad

Static members

Static member Description

f >=> g

Full Usage: f >=> g

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

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

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

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

Other module members

Union cases

Union case Description

Writer 't * 'monoid

Full Usage: Writer 't * 'monoid

Parameters:
    Item : 't * 'monoid

Item : 't * 'monoid

Static members

Static member Description

f <*> x

Full Usage: f <*> x

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

g =>> f

Full Usage: g =>> f

Parameters:
Returns: Writer<'U, 'W>
g : Writer<'T, 'W>
f : Writer<'T, 'W> -> 'U
Returns: Writer<'U, 'W>

x >>= f

Full Usage: x >>= f

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

Writer.Extract(arg1)

Full Usage: Writer.Extract(arg1)

Parameters:
Returns: 'T
arg0 : Writer<'T, 'W>
Returns: 'T

Writer.Listen(m)

Full Usage: Writer.Listen(m)

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

Writer.Map(x, f)

Full Usage: Writer.Map(x, f)

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

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

Writer.Pass(m)

Full Usage: Writer.Pass(m)

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

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

Writer.Return(x)

Full Usage: Writer.Return(x)

Parameters:
    x : 'T

Returns: Writer<^Monoid, 'T>
Modifiers: inline
x : 'T
Returns: Writer<^Monoid, 'T>

Writer.Tell(w)

Full Usage: Writer.Tell(w)

Parameters:
    w : 'Monoid

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