**delete**

Remove an entry from the hash table.

delete x removes the first occurrence of x from its list argument. For example,
> delete 'a' "banana" == "bnana"
It is a special case of deleteBy, which allows the programmer to supply their own equality test.
*O(min(n,W))*. Delete a key and its value from the map. When the key is not a member of the map, the original map is returned.
> delete 5 (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"
> delete 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]
> delete 5 empty == empty

*O(min(n,W))*. Delete a value in the set. Returns the original set when the value was not present.

*O(log n)*. Delete an element from a set.

*O(log n)*. Delete a key and its value from the map. When the key is not a member of the map, the original map is returned.
> delete 5 (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"
> delete 7 (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a")]
> delete 5 empty == empty

The deleteBy function behaves like delete, but takes a user-supplied equality predicate.
The deleteFirstsBy function takes a predicate and two lists and returns the first list with the first occurrence of each element of the second list removed.
*O(log n)*. Delete the element at *index*, i.e. by its zero-based index in the sequence sorted by keys. If the *index* is out of range (less than zero, greater or equal to size of the map), error is called.
> deleteAt 0 (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"
> deleteAt 1 (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"
> deleteAt 2 (fromList [(5,"a"), (3,"b")]) Error: index out of range
> deleteAt (-1) (fromList [(5,"a"), (3,"b")]) Error: index out of range
*O(log n)*. Delete the element at *index*, i.e. by its zero-based index in the sorted sequence of elements. If the *index* is out of range (less than zero, greater or equal to size of the set), error is called.
> deleteAt 0 (fromList [5,3]) == singleton 5
> deleteAt 1 (fromList [5,3]) == singleton 3
> deleteAt 2 (fromList [5,3]) Error: index out of range
> deleteAt (-1) (fromList [5,3]) Error: index out of range
Delete a cookie from the client by setting the cookie expiry date to a date in the past.

Delete a cookie from the client

*O(min(n,W))*. Delete and find the maximal element.

*O(min(n,W))*. Delete and find the maximal element.
> deleteFindMax set = (findMax set, deleteMax set)

*O(log n)*. Delete and find the maximal element.
> deleteFindMax (fromList [(5,"a"), (3,"b"), (10,"c")]) == ((10,"c"), fromList [(3,"b"), (5,"a")])
> deleteFindMax empty Error: can not return the maximal element of an empty map

*O(log n)*. Delete and find the maximal element.
> deleteFindMax set = (findMax set, deleteMax set)

*O(min(n,W))*. Delete and find the minimal element.

*O(min(n,W))*. Delete and find the minimal element.
> deleteFindMin set = (findMin set, deleteMin set)

*O(log n)*. Delete and find the minimal element.
> deleteFindMin (fromList [(5,"a"), (3,"b"), (10,"c")]) == ((3,"b"), fromList[(5,"a"), (10,"c")])
> deleteFindMin Error: can not return the minimal element of an empty map

*O(log n)*. Delete and find the minimal element.
> deleteFindMin set = (findMin set, deleteMin set)

Show more results