Skip to contents

Creates a Logger monad instance which can be used with the flatMap operator %>>=%. See the Monads in R vignette for more details.

This container, when flatMapped, records the expressions used at each step, and these can be recovered from the object, potentially for re-evaluation.

See also

Public fields

value

value contained in the instance

log

log of the evaluated expressions

Methods


Method new()

create a new Logger instance

Usage

Logger$new(value)

Arguments

value

value to be contained

Returns

a new Logger instance


Method bind()

bind when using flatMap (%>>=%)

Usage

Logger$bind(f, expr)

Arguments

f

function to apply

expr

expression of the function


Method clone()

The objects of this class are cloneable with this method.

Usage

Logger$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.