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