Note that although you can use either lookup or lookup! to retrieve a value from a
transient map, and either default or default! to read its default, only the forms
ending in ! can be used as a setf place.
Returns true iff tm is currently empty. O(1).
Returns the current number of elements in tm. O(1).
Returns an arbitrary element of the current contents of tm. Specifically,
on a nonempty map, returns three values: an arbitrary key, its value, and true; on an empty map,
returns nil, nil, and false. O(1).
Returns true iff key is currently a key of tm, and if value is supplied, it is the corresponding value. O(log n).
Removes all elements from tm, resetting it to the empty state. O(1).
Modifies tm so that it maps key to value. Has no effect if this was already the case. Returns tm. O(log n).
Modifies tm so that it does not contain a mapping for key. Has no effect if this was already the case. Returns tm. O(log n).
If tm currently contains a key equal to k, according to its key comparison function, returns three
values: the corresponding value, true, and the key found; otherwise, the map’s default, false, and nil. If the key is not found and the map has no default,
signals an error of type map-domain-error. O(log n).
Invoked as (setf (lookup! tm key) value). Modifies tm so that it
maps key to value. Has no effect if this was already the case. Returns value
(the CL spec for setf requires this). O(log n).
Returns the default associated with tm.
Invoked as (setf (default! tm) new-default). Changes the default associated with
tm to new-default.
Removes the default from tm. Subsequent lookups using keys not in the domain of tm will cause an error to be signalled.
Returns a persistent FSet ch-map (the usual kind, with functional semantics) with the
contents of tm. Subsequent modifications to the transient are permitted, and of course will
not affect the persistent one.
This operation has two modes, depending on copy?. If copy? is false (the default), it takes O(1) time; but subsequent modifications to the transient will behave performance-wise as if a new transient had been created. If copy? is true, the operation takes O(n) time, but subsequent modifications to the transient will run at full speed. Copying the collection also compacts it, so it uses less heap space.