insert

Inserts a key/value mapping into the hash table. Note that insert doesn't remove the old entry from the table - the behaviour is like an association list, the most-recently-inserted mapping for a key in the table. The reason for this is to keep insert as efficient as possible. If you need to update a mapping, then we provide update.
The insert function takes an element and a list and inserts the element into the list at the last position or equal to the next element. In particular, if the list is sorted before the call, the result will also be sorted. It is a special case of insertBy, which allows the programmer to supply their own comparison function.
O(min(n,W)). Add a value to the set. There is no left- or right bias for IntSets.
O(min(n,W)). Insert a new key/value pair in the map. If the key is already present in the map, the associated value is replaced with the supplied value, i.e. insert is equivalent to insertWith const. > insert 5 'x' (fromList [(5,'a'), (3,'b')]) == fromList [(3, 'b'), (5, 'x')] > insert 7 'x' (fromList [(5,'a'), (3,'b')]) == fromList [(3, 'b'), (5, 'a'), (7, 'x')] > insert 5 'x' empty == singleton 5 'x'
O(log n). Insert an element in a set. If the set already contains an element equal to the given value, it is replaced with the new value.
O(log n). Insert a new key and value in the map. If the key is already present in the map, the associated value is replaced with the supplied value. insert is equivalent to insertWith const. > insert 5 'x' (fromList [(5,'a'), (3,'b')]) == fromList [(3, 'b'), (5, 'x')] > insert 7 'x' (fromList [(5,'a'), (3,'b')]) == fromList [(3, 'b'), (5, 'a'), (7, 'x')] > insert 5 'x' empty == singleton 5 'x'
insertHeader hdr val x inserts a header with the given header name and value. Does not check for existing headers with same name, allowing duplicates to be introduce (use replaceHeader if you want to avoid this.)