List.pop_at/3

defmodule List do
  def pop_at(list, index, default \\ nil)
end

Returns and removes the value at the specified index in the list.

Negative indices indicate an offset from the end of the list.

If index is out of bounds, the original list is returned.