From 61da6944d687693c25fd24116412541f3c64a8fd Mon Sep 17 00:00:00 2001 From: Fardale Date: Fri, 21 Dec 2018 02:08:02 +0100 Subject: [PATCH] [CCResult] new formulation for map_l --- src/core/CCResult.mli | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/CCResult.mli b/src/core/CCResult.mli index 8c5a9d49..ffd67510 100644 --- a/src/core/CCResult.mli +++ b/src/core/CCResult.mli @@ -188,9 +188,9 @@ end (** {2 Collections} *) val map_l : ('a -> ('b, 'err) t) -> 'a list -> ('b list, 'err) t -(** [map_l f l] apply [f] on every element of [l], and, in case of success for every - element, return [Ok (List.map f l)]. Otherwise, it fails, and the first error is - returned.*) +(** [map_l f \[a1; ...; an\]] applies function f to a1, ..., an , and, in case of + success for every elements, return the list of [Ok]-value. + Otherwise, it fails and return the first error encountered. Tail-recursive.*) val fold_l : ('b -> 'a -> ('b, 'err) t) -> 'b -> 'a list -> ('b, 'err) t