package spotlib

  1. Overview
  2. Docs
val ok : 'a -> ('a, 'error) result
val ng : 'error -> ('a, 'error) result

No Good

val from_Ok : ('a, 'error) t -> 'a

Raises IsError when not Ok _

val result : ('a -> 'b) -> ('c -> 'b) -> ('a, 'c) t -> 'b

Haskell's either

val at_Error : ('err -> 'a) -> ('a, 'err) t -> 'a

at_Error = result id

OCaml

Innovation. Community. Security.