From d4d22b14889d258d8d979c8e0042b0357641c971 Mon Sep 17 00:00:00 2001 From: Roma Sokolov Date: Tue, 4 Oct 2016 14:27:34 +0300 Subject: [PATCH] Fixes map_or ~default arg for `map_or`, as well as function, should not depend on the type of error case. --- src/core/CCResult.mli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/CCResult.mli b/src/core/CCResult.mli index 9a1dedc2..fb764167 100644 --- a/src/core/CCResult.mli +++ b/src/core/CCResult.mli @@ -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