mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
Merge pull request #79 from little-arhat/patch-1
fix `CCResult.map_or` type signature (thanks to @little-arhat)
This commit is contained in:
commit
6cd4e6923c
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
|
val get_or : ('a, _) t -> default:'a -> 'a
|
||||||
(** [get_or e ~default] returns [x] if [e = Ok x], [default] otherwise *)
|
(** [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 *)
|
(** [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
|
val catch : ('a, 'err) t -> ok:('a -> 'b) -> err:('err -> 'b) -> 'b
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue