Module Util_pure.BatMap

type 'a not_found := [
  1. | `Err of string
  2. | `Pp of Stdlib.Format.formatter -> 'a -> unit
]
type ('a, 'b) t = ('a, 'b) BatMap.t
val if_empty : (('a, 'b) t -> 'c) -> (('a, 'b) t -> 'c) -> ('a, 'b) t -> 'c
val modify_result : ?not_found:'a not_found -> 'a -> ('b -> 'b) -> ('a, 'b) t -> ('a, 'b) t rresult

Like `modify_result`, except that `f` returns a result.

val modify_result' : ?not_found:'a not_found -> 'a -> ('b -> 'b rresult) -> ('a, 'b) t -> ('a, 'b) t rresult

Like `modify_result`, except that `f` returns a result.

val of_list : ('a * 'b) list -> ('a, 'b) t
val to_list : ('a, 'b) t -> ('a * 'b) list
val has_key : 'a -> ('a, 'b) t -> bool
val keys_list : ('a, 'b) t -> 'a list
val values_list : ('a, 'b) t -> 'b list
val remove_result : ?not_found:'a not_found -> 'a -> ('a, 'b) t -> ('a, 'b) t rresult
val extract_result : ?not_found:'a not_found -> 'a -> ('a, 'b) t -> ('b * ('a, 'b) t) rresult
val extract_opt : 'a -> ('a, 'b) t -> ('b * ('a, 'b) t) option