Merge pull request #79 from little-arhat/patch-1

fix `CCResult.map_or` type signature (thanks to @little-arhat)
This commit is contained in:
Simon Cruanes 2016-10-04 13:34:31 +02:00 committed by GitHub
commit 6cd4e6923c

View file

@ -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