fact: Definition index_of {A} (f : A -> t bool) (l : mlist A) : t (moption nat) := '(m: _, r) <- fold_left (fun '(m: i, r) x => match r with | mSome _ => ret (m: i,r) | _ => mif f x then ret (m: i, mSome i) else ret (m: S i, mNone) end ) l (m: 0, mNone); ret r.
imports: Strings.String NArith.BinNat Mtac2(Logic Datatypes Logic List Utils MTele Pattern Specif)