esc: Returns the value a monad holds

Description Usage Arguments Details See Also Examples

View source: R/from-monad.R

Description

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

Usage

1
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

1
2
library(magrittr)
256 %>>% sqrt %>% esc

rmonad documentation built on March 26, 2020, 7:31 p.m.