∀ {α : Type u} {r : Std.Roo α} [inst : LT α] [inst_1 : DecidableLT α] [inst_2 : Std.PRange.UpwardEnumerable α]
  [inst_3 : Std.PRange.LawfulUpwardEnumerableLT α] [inst_4 : Std.Rxo.IsAlwaysFinite α]
  [inst_5 : Std.PRange.LawfulUpwardEnumerable α] {m : Type u → Type w} [inst_6 : Monad m] [LawfulMonad m] {γ : Type u}
  {init : γ} {f : (a : α) → a ∈ r → γ → m (ForInStep γ)},
  forIn' r init f =
    match hs : Std.PRange.succ? r.lower with
    | none => pure init
    | some next =>
      if hu : next < r.upper then
        have hlt := ⋯;
        have hle := ⋯;
        do
        let __do_lift ← f next ⋯ init
        match __do_lift with
          | ForInStep.yield c => forIn' (next<...r.upper) c fun a ha acc => f a ⋯ acc
          | ForInStep.done c => pure c
      else pure init