FSharpx.Extras


WriterBuilder<'W> Type

The writer monad. This monad comes from Matthew Podwysocki's http://codebetter.com/blogs/matthew.podwysocki/archive/2010/02/01/a-kick-in-the-monads-writer-edition.aspx.

Constructors

Constructor Description

WriterBuilder(monoid)

Full Usage: WriterBuilder(monoid)

Parameters:
Returns: WriterBuilder<'W>
monoid : Monoid<'W>
Returns: WriterBuilder<'W>

Instance members

Instance member Description

this.Bind

Full Usage: this.Bind

Parameters:
Returns: unit -> 'b * 'W
writer : Writer<'W, 'a>
k : 'a -> Writer<'W, 'b>
Returns: unit -> 'b * 'W

this.Combine

Full Usage: this.Combine

Parameters:
Returns: unit -> 'a * 'W
comp1 : Writer<'W, unit>
comp2 : Writer<'W, 'a>
Returns: unit -> 'a * 'W

this.Delay

Full Usage: this.Delay

Parameters:
Returns: unit -> 'a * 'W
f : unit -> Writer<'W, 'a>
Returns: unit -> 'a * 'W

this.For

Full Usage: this.For

Parameters:
    sequence : 'T seq
    body : 'T -> Writer<'W, unit>

Returns: unit -> unit * 'W
sequence : 'T seq
body : 'T -> Writer<'W, unit>
Returns: unit -> unit * 'W

this.Return

Full Usage: this.Return

Parameters:
    a : 'T

Returns: Writer<'W, 'T>
a : 'T
Returns: Writer<'W, 'T>

this.ReturnFrom

Full Usage: this.ReturnFrom

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

this.TryFinally

Full Usage: this.TryFinally

Parameters:
    writer : unit -> 'a
    compensation : unit -> unit

Returns: unit -> 'a
writer : unit -> 'a
compensation : unit -> unit
Returns: unit -> 'a

this.TryWith

Full Usage: this.TryWith

Parameters:
Returns: Writer<'W, 'T>
writer : Writer<'W, 'T>
handler : exn -> Writer<'W, 'T>
Returns: Writer<'W, 'T>

this.Using

Full Usage: this.Using

Parameters:
    resource : 'a
    body : 'a -> unit -> 'b

Returns: unit -> 'b
resource : 'a
body : 'a -> unit -> 'b
Returns: unit -> 'b

this.While

Full Usage: this.While

Parameters:
    guard : unit -> bool
    m : Writer<'W, unit>

Returns: unit -> unit * 'W
guard : unit -> bool
m : Writer<'W, unit>
Returns: unit -> unit * 'W

this.Zero

Full Usage: this.Zero

Returns: Writer<'W, unit>
Returns: Writer<'W, unit>