     if current_index == length(list) do
       new_list
     else
-      new_list = case current_index == index do
+      updated = case current_index == index do
         true ->
           new_list
         _ ->
           new_list ++ [list[current_index]]
       end
 
-      do_delete_at(list, index, current_index + 1, new_list)
+      do_delete_at(list, index, current_index + 1, updated)
     end
   end
 

    if current_index == length(list) do
      new_list
    else
      new_list = case list[current_index] do
        ^item ->
          new_list
        _ ->
          new_list ++ [list[current_index]]
      end

      do_delete(list, item, current_index + 1, new_list)
    end
  end


    if current_index == length(list) do
      new_list
    else
      updated = case current_index == index do
        true ->
          new_list ++ [value, list[current_index]]
        _ ->
          new_list ++ [list[current_index]]
      end

      do_insert_at(list, index, value, current_index + 1, updated)
    end
  end

