Error_monad: make filter_map_p truly parallel
This commit is contained in:
parent
18f6dab856
commit
52dc0c5858
@ -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 ->
|
||||
|
Loading…
Reference in New Issue
Block a user