     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 ++ [func.(list[current_index])]
         _ ->
           new_list ++ [list[current_index]]
       end
 
-      do_update_at(list, index, func, current_index + 1, new_list)
+      do_update_at(list, index, func, current_index + 1, updated)
     end
   end
 

  defp do_keyreplace(list, key, position, new_list, new_tuple) do
    current_value = hd(list)

    new_list = if elem(current_value, position) == key do
      new_list ++ [new_tuple]
    else
      new_list ++ [current_value]
    end

    do_keyreplace(tl(list), key, position, new_list, new_tuple)
  end

  def zip(list_of_lists) do

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

      do_delete_at(list, index, current_index + 1, updated)
    end
  end

