package promise_jsoo

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

from_catch p catches any rejections on the promise p and resolves it to Error reason, or Ok value when the promise is fulfilled

val return : 'a -> ('a, 'e) result t
val map : ('a -> 'b) -> ('a, 'e) result t -> ('b, 'e) result t
val bind : ('a -> ('b, 'e) result t) -> ('a, 'e) result t -> ('b, 'e) result t
val iter : ?ok:('a -> unit) -> ?error:('b -> unit) -> ('a, 'b) result t -> unit t
module Syntax : sig ... end
OCaml

Innovation. Community. Security.