package spotlib

  1. Overview
  2. Docs
val ok : 'a -> [> `Ok of 'a ]
val ng : 'a -> [> `Error of 'a ]

No Good

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

Raises Spotlib.Spot.Result.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.