Learn R Programming

rmonad (version 0.7.0)

esc: Returns the value a monad holds

Description

If the monad is in the passing state, return the wrapped value. Otherwise, raise an appropriate error.

Usage

esc(m, quiet = FALSE)

Arguments

m

An Rmonad

quiet

If TRUE, print the exact messages that are raised, without extra context.

Details

Regardless of pass/fail status, esc raises all collected warnings and prints all messages. Terminating a monadic sequence with esc should obtain a result very close to running the same code outside the monad. The main difference is that Rmonad appends the toplevel code that generated the error.

See Also

Other from_Rmonad: missues, mtabulate, report

Examples

Run this code
# NOT RUN {
library(magrittr)
256 %>>% sqrt %>% esc
# }

Run the code above in your browser using DataLab