Module Util_pure.Result

type ('a, 'b) t = ('a, 'b) Stdlib.Result.t
type 'a rt = 'a rresult
type decorate_s := [
  1. | `F of string -> string
  2. | `S of string
]
val decorate_error_s : decorate_s -> ('a, string) t -> ('a, string) t
val decorate_error : ('b -> 'c) -> ('a, 'b) t -> ('a, 'c) t
val rdecorate_error : decorate_s -> 'a rresult -> 'a rresult
val map : decorate_error:('b -> 'c) -> ('a -> 'd) -> ('a, 'b) t -> ('d, 'c) t
val map_s : decorate_error:decorate_s -> ('a -> 'b) -> ('a, string) t -> ('b, string) t
val rmap : ?decorate_error:decorate_s -> ('a -> 'b) -> 'a rt -> 'b rt
val (<$>) : ('a -> 'b) -> ('a, 'c) t -> ('b, 'c) t
val (<*>) : ('a -> 'b, 'c) t -> ('a, 'c) t -> ('b, 'c) t
val lift : ('a -> 'b) -> ('a, 'e) t -> ('b, 'e) t
val lift2 : ('a -> 'b -> 'c) -> ('a, 'e) t -> ('b, 'e) t -> ('c, 'e) t
val lift3 : ('a -> 'b -> 'c -> 'd) -> ('a, 'e) t -> ('b, 'e) t -> ('c, 'e) t -> ('d, 'e) t
val lift4 : ('a -> 'b -> 'c -> 'd -> 'f) -> ('a, 'e) t -> ('b, 'e) t -> ('c, 'e) t -> ('d, 'e) t -> ('f, 'e) t
val lift5 : ('a -> 'b -> 'c -> 'd -> 'f -> 'g) -> ('a, 'e) t -> ('b, 'e) t -> ('c, 'e) t -> ('d, 'e) t -> ('f, 'e) t -> ('g, 'e) t
val fold_list_left_m : ('a -> 'b -> ('a, 'c) t) -> 'a -> 'b list -> ('a, 'c) t
val fold_list_right_m : ('b -> 'a -> ('a, 'c) t) -> 'a -> 'b list -> ('a, 'c) t
val fold : ('a -> 'c) -> ('b -> 'c) -> ('a, 'b) t -> 'c
val wanneer' : (unit -> bool) -> (unit -> (unit, 'a) t) -> (unit, 'a) t
val wanneer : bool -> (unit -> (unit, 'a) t) -> (unit, 'a) t

Given a list of functions rs where r : unit -> ('a, 'b) t, find the first one which returns Ok result. If found, return Some result, otherwise None.

val list_find_f_ok : (unit -> ('a, 'b) t) list -> 'a Option.t

Given a list of functions rs where r : unit -> ('a, 'b) t, find the first one which returns Ok result. If found, return Some result, otherwise None.

Like list_find_f_ok, but on failure it returns Error of 'b list, which has the same length as rs and contains the Error values that were encountered during the attempt.

val list_find_f_ok_result : (unit -> ('a, 'b) t) list -> ('a, 'b list) t

Like list_find_f_ok, but on failure it returns Error of 'b list, which has the same length as rs and contains the Error values that were encountered during the attempt.

module Infix : sig ... end

A combination of Infix and Let (for let* etc.)

module Letsfix : sig ... end

A combination of Infix and Let (for let* etc.)