Returns true iff ts is currently empty. O(1).
Returns the current number of elements in ts. O(1).
Returns an arbitrary element of the current contents of ts. Specifically, on a nonempty set, returns two values: an arbitrary element and true; on an empty set, returns two false values. O(1).
Returns true iff x is currently an element of ts. O(log n).
Removes all elements from ts, resetting it to the empty state. O(1).
Modifies ts so that it contains value. Has no effect if this was already the case. Returns ts. O(log n).
Modifies ts so that it does not contain value. Has no effect if this was already the case. Returns ts. O(log n).
Returns a persistent FSet ch-set (the usual kind, with functional semantics) with the
contents of ts. 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.