-
Effekt Library
- result
- Result
- Error
- Success
- result
- result
- value
- toOption
- isError
- isSuccess
- result Jump to source: libraries/common/result.effekt
- Result
[A, E] - Error
(exception: E, msg: String) - Success
(a: A) - result
[A, E] { f: => A / {Exception[E]} }: Result[A, E] / {} - result
[A, E] (proxy: on[E]) { f: => A / {Exception[E]} }: Result[A, E] / {} - value
[A, E] (r: Result[A, E]): A / {Exception[E]} - toOption
[A, E] (r: Result[A, E]): Option[A] / {} - isError
[A, E] (r: Result[A, E]): Bool / {} - isSuccess
[A, E] (r: Result[A, E]): Bool / {}
Example usage: examples/stdlib/result
Represents the result of a potentially failing computation. It is the "reification" of the Exception[E] effect.
Represent ("reify") the result of a potentially failing computation.Extracts the value of a result, if available Monadic "reflection"
Converts a result to an option forgetting the error details