let for_sequential:
'a list -> f:('a -> ('c, 'b) t) -> ('c list * 'b list, 'd) t
= fun l ~f ->
let oks = ref [] in
let errors = ref [] in
List.fold_left l ~init:(return ()) ~f:(fun prevm elt ->
prevm >>= fun () ->
f elt >>< function
| `Ok o -> oks := o :: !oks; return ()
| `Error e -> errors := e :: !errors; return ())
>>= fun () ->
return (List.rev !oks, List.rev !errors)