Try {matchr}R Documentation

Execute Expression as Result

Description

Evaluates given expression returning an Err Result if there is an error, otherwise an Ok Result.

Usage

Try(expr)

Arguments

expr

expression to evaluate

Value

Result Enum of variant Ok or Err

Examples

# This returns an Err
Try(sqrt + 1)

# This returns an Ok
Try(sqrt(5) + 1)

[Package matchr version 0.1.0 Index]