fact: Definition snth_indices (l : mlist dyn) (t : tactic) : selector unit := fun goals=> M.fold_left (fun (accu : mlist (unit *m goal gs_any)) (d : dyn)=> dcase d as c in i <- index c; let ogoal := mnth_error goals i in match ogoal with | mSome (m: _, g) => newgoals <- open_and_apply t g; let res := dreduce (@mapp, @mmap) (accu +m+ newgoals) in T.filter_goals res | mNone => M.failwith "snth_indices" end) l goals.
imports: Coq.Strings.String Mtac2(Datatypes List Mtac2)