let wrap_with3 with3 a b c f =
  res_exn & (fun () -> with3 a b c (exn_res % f))