From fbf24ea7c7ef8199dbb09cec690086e8667904c8 Mon Sep 17 00:00:00 2001 From: "Hezekiah M. Carty" Date: Tue, 18 Nov 2014 11:09:54 -0500 Subject: [PATCH] CCError.map2 could map to a new error type With the recent change from `_ CCError.t` to `(_, _) CCError.t` it's reasonable to allow `map2` to take an argument transforming the error to a new type. --- core/CCError.mli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/CCError.mli b/core/CCError.mli index 95929888..7ab6bef2 100644 --- a/core/CCError.mli +++ b/core/CCError.mli @@ -62,7 +62,7 @@ val map_err : ('err1 -> 'err2) -> ('a, 'err1) t -> ('a, 'err2) t (** Map on error. @since 0.5 *) -val map2 : ('a -> 'b) -> ('err -> 'err) -> ('a, 'err) t -> ('b, 'err) t +val map2 : ('a -> 'b) -> ('err1 -> 'err2) -> ('a, 'err1) t -> ('b, 'err2) t (** Same as {!map}, but also with a function that can transform the error message in case of failure *)