mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
Fixes map_or
~default arg for `map_or`, as well as function, should not depend on the type of error case.
This commit is contained in:
parent
d7e8cb24fd
commit
d4d22b1488
1 changed files with 1 additions and 1 deletions
|
|
@ -67,7 +67,7 @@ val get_exn : ('a, _) t -> 'a
|
|||
val get_or : ('a, _) t -> default:'a -> 'a
|
||||
(** [get_or e ~default] returns [x] if [e = Ok x], [default] otherwise *)
|
||||
|
||||
val map_or : ('a -> 'b) -> ('a, 'b) t -> default:'b -> 'b
|
||||
val map_or : ('a -> 'b) -> ('a, 'c) t -> default:'b -> 'b
|
||||
(** [map_or f e ~default] returns [f x] if [e = Ok x], [default] otherwise *)
|
||||
|
||||
val catch : ('a, 'err) t -> ok:('a -> 'b) -> err:('err -> 'b) -> 'b
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue