Module lambda_calculus::data::result
source · Expand description
Lambda-encoded result type
Functions
- Applied to a lambda-encoded
Resultand a function that returns a lambda-encodedResult, it applies the function to the contents of theResultif it isOk. - Applied to an argument it consumes it and produces a lambda-encoded
Result::Errthat contains it. - Applied to a lambda-encoded
Resultit produces a lambda-encoded boolean indicating whether it isResult::Err. - Applied to a lambda-encoded
Resultit produces a lambda-encoded boolean indicating whether it isResult::Ok. - Applied to a function and a lambda-encoded
Resultit applies the function to the contents of theResultif it isOk. - Applied to a function and a lambda-encoded
Resultit applies the function to the contents of theResultif it isErr. - Applied to an argument it consumes it and produces a lambda-encoded
Result::Okthat contains it. - Applied to a lambda-encoded
Resultit produces a lambda-encodedOptioncontaining theErrvalue. - Applied to a lambda-encoded
Resultit produces a lambda-encodedOptioncontaining theOkvalue. - Applied to a
Termand a lambda-encodedResultit returns the value inside theOkor the first argument if theResultis notOk.