delete package:containers

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
Delete a value in the set. Returns the original set when the value was not present.
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
Delete an element from a set.
Delete and find the maximal element. This function throws an error if the map is empty. Use maxViewWithKey if the map may be empty.
Delete and find the minimal element. This function throws an error if the map is empty. Use minViewWithKey if the map may be empty.
Delete the maximal key. Returns an empty map if the map is empty. Note that this is a change of behaviour for consistency with Map – versions prior to 0.5 threw an error if the IntMap was already empty.
Delete the minimal key. Returns an empty map if the map is empty. Note that this is a change of behaviour for consistency with Map – versions prior to 0.5 threw an error if the IntMap was already empty.
Delete and find the maximal element.
deleteFindMax set = (findMax set, deleteMax set)
Delete and find the minimal element.
deleteFindMin set = (findMin set, deleteMin set)
Delete the maximal element. Returns an empty set if the set is empty. Note that this is a change of behaviour for consistency with Set – versions prior to 0.5 threw an error if the IntSet was already empty.
Delete the minimal element. Returns an empty set if the set is empty. Note that this is a change of behaviour for consistency with Set – versions prior to 0.5 threw an error if the IntSet was already empty.
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
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
Delete and find the minimal element.
deleteFindMin (fromList [(5,"a"), (3,"b"), (10,"c")]) == ((3,"b"), fromList[(5,"a"), (10,"c")])
deleteFindMin empty                                      Error: can not return the minimal element of an empty map
Delete the maximal key. Returns an empty map if the map is empty.
deleteMax (fromList [(5,"a"), (3,"b"), (7,"c")]) == fromList [(3,"b"), (5,"a")]
deleteMax empty == empty
Delete the minimal key. Returns an empty map if the map is empty.
deleteMin (fromList [(5,"a"), (3,"b"), (7,"c")]) == fromList [(5,"a"), (7,"c")]
deleteMin empty == empty
Delete the element of a sequence at a given index. Return the original sequence if the index is out of range.
deleteAt 2 [a,b,c,d] = [a,b,d]
deleteAt 4 [a,b,c,d] = deleteAt (-1) [a,b,c,d] = [a,b,c,d]
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 and find the maximal element.
deleteFindMax set = (findMax set, deleteMax set)
Delete and find the minimal element.
deleteFindMin set = (findMin set, deleteMin set)
Delete the maximal element. Returns an empty set if the set is empty.
Delete the minimal element. Returns an empty set if the set is empty.