         :erlang.raise(kind, reason, stacktrace)
     else
       {:done, acc} ->
-        do_transform_user(
-          vals,
-          user_acc,
-          user,
-          fun,
-          next_op,
-          next,
-          {:cont, acc},
-          inner,
-          after_fun
-        )
+        do_transform_user(vals, user_acc, next_op, next, {:cont, acc}, funs)
 
       {:halted, acc} ->
         next.({:halt, []})
         do_after(after_fun, user_acc)
         {:halted, acc}
 
-      {:suspended, acc, c} ->
-        {
-          :suspended,
-          acc,
-          &do_list_transform(vals, user_acc, user, fun, next_op, next, &1, inner, c, after_fun)
-        }
-    end
-  end
-
-  defp do_enum_transform(
-         vals,
-         user_acc,
-         user,
-         fun,
-         next_op,
-         next,
-         {op, inner_acc},
-         inner,
-         reduce,
-         after_fun
-       ) do
+      {:suspended, acc, continuation} ->
+        resume = &do_list_transform(vals, user_acc, next_op, next, &1, continuation, funs)
+        {:suspended, acc, resume}
+    end
+  end
+
+  defp do_enum_transform(vals, user_acc, next_op, next, {op, inner_acc}, reduce, funs) do
+    {_, _, _, after_fun} = funs
+
     try do
       reduce.({op, [:outer | inner_acc]})
     catch

    inner = &do_transform_each(&1, &2, fun)
    step = &do_transform_step(&1, &2)
    next = &Enumerable.reduce(enumerables, &1, step)
    do_transform(user_acc.(), user, fun, :cont, next, inner_acc, inner, after_fun)
  end

  defp do_transform(user_acc, _user, _fun, _next_op, next, {:halt, inner_acc}, _inner, after_fun) do
    next.({:halt, []})
    do_after(after_fun, user_acc)
    {:halted, inner_acc}
  end

  defp do_transform(user_acc, user, fun, next_op, next, {:suspend, inner_acc}, inner, after_fun) do
    {
      :suspended,
      inner_acc,
      &do_transform(user_acc, user, fun, next_op, next, &1, inner, after_fun)
    }
  end

  defp do_transform(user_acc, _user, _fun, :halt, _next, {_, inner_acc}, _inner, after_fun) do
    do_after(after_fun, user_acc)
    {:halted, inner_acc}
  end

  defp do_transform(user_acc, user, fun, :cont, next, inner_acc, inner, after_fun) do
    try do
      next.({:cont, []})
    catch

      # Otherwise, we were the ones wishing to halt, so we should just stop.
      {:halted, [:outer | acc]}
      when op != :halt ->
        do_transform_user(vals, user_acc, next_op, next, {:cont, acc}, funs)

      {:halted, [_ | acc]} ->
        next.({:halt, []})
