Timer Monad
Timer Monad
Details
Creates a Timer 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 evaluation time of the expressions used at each step, and these can be recovered from the object, along with the expressions themselves.
Usage
x <- Timer$new(value)
x$bind()
x$value
x$timesDetails
$new(value) creates a new instance wrapping value.
$bind() is used within %>>=% and re-wraps as a new Timer.
$value extracts the value field. value(x) is a wrapper for this.
$times extracts the times field. times(x) is a wrapper for this.
