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