Deletes an item from a collection, without returning it.
The simplest way to call this function is (del! coll key)
. If the index key
is not
present, it's an error.
The ?
special syntax can be used to permit missing items: (del! coll (? key))
.
In that case, the function will succeed even if the index key
is not present.
When coll
is a deque, slicing syntax is supported: (del! coll 2 :)
.
This will delete all elements with an index of 2 or more. del!
is usually more
efficient than remove!
when deleting a slice, because it doesn't need to perform
any allocation.