result: Result Type for Safely Handling Operations that can Succeed or Fail

Allows wrapping values in success() and failure() types to capture the result of operations, along with any status codes. Risky expressions can be wrapped in as_result() and functions wrapped in result() to catch errors and assign the relevant result types. Monadic functions can be bound together as pipelines or transaction scripts using then_try(), to gracefully handle errors at any step.

Getting started

Package details

AuthorSoumya Ray [aut, cre, cph] (<https://orcid.org/0000-0002-7497-3281>)
MaintainerSoumya Ray <soumya.ray@gmail.com>
LicenseMIT + file LICENSE
Version0.1.0
URL https://github.com/soumyaray/result
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:
install.packages("result")

Try the result package in your browser

Any scripts or data that you put into this service are public.

result documentation built on Nov. 22, 2023, 1:09 a.m.