Discord.SortedSet.index_remove

You're seeing just the function index_remove, go back to Discord.SortedSet module for more information.

Specs

index_remove(set :: t(), item :: any()) ::
  {index :: non_neg_integer(), t()} | Discord.SortedSet.Types.common_errors()

Removes an item from the set, returning the index of the item before removal.

If the item is not present in the set, the index nil is returned along with the set. If the index is not needed the remove/2 function can be used instead, there is no performance difference between these two functions.

Performance

Unlike a hash based set that has O(1) removes, the SortedSet is O(log(N/B)) + O(log(B)) where N is the number of items in the SortedSet and B is the Bucket Size.