result

From MaRDI portal
Revision as of 20:10, 12 March 2024 by Import240312060351 (talk | contribs) (Created automatically from import240312060351)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Software:5979779



CRANresultMaRDI QIDQ5979779

Result Type for Safely Handling Operations that can Succeed or Fail

Soumya Ray

Last update: 21 November 2023

Software version identifier: 0.1.0


Copyright license: MIT license, File License

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.