From 52dc0c5858d00e6b58bfa12a3a50d746d0e8cd71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Proust?= Date: Tue, 19 Jun 2018 14:36:28 +0800 Subject: [PATCH] Error_monad: make filter_map_p truly parallel --- src/lib_error_monad/error_monad.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib_error_monad/error_monad.ml b/src/lib_error_monad/error_monad.ml index 0c71779b1..fedd33e6a 100644 --- a/src/lib_error_monad/error_monad.ml +++ b/src/lib_error_monad/error_monad.ml @@ -426,12 +426,12 @@ module Make(Prefix : sig val id : string end) = struct filter_map_s f t >>=? fun rt -> return (rh :: rt) - let filter_map_p f l = + let rec filter_map_p f l = match l with | [] -> return [] | h :: t -> let th = f h - and tt = filter_map_s f t in + and tt = filter_map_p f t in th >>=? function | None -> tt | Some rh ->