Class Wb-Seq

A class of functional seqs (sequences, but we use the short name to avoid
confusion with cl:sequence) represented as weight-balanced binary trees.
This is the default implementation of seqs in FSet.

Part of:

package fset, class seq

Direct Superclass

seqThe abstract class for FSet functional seqs (sequences, but we use the short
name to avoid confus...

Slot

contents
default

Direct Method

compareReturns one of :less, :greater, :equal, or :unequal according as x
is less than, greate...
compare-lexicographicallyReturns the result of a lexicographic comparison of a and b, which
can be strings, vectors, l...
concatReturns the concatenation of seq1 and seq2.
convertConverts the collection to the specified type. Some methods may
take additional keyword argument...
domainReturns the domain of the map, that is, the set of keys mapped by the map.
empty?Returns true iff the collection is empty.
firstReturns the first element of seq, i.e., element 0. This has a back-
compatibility method for l...
insertReturns a new sequence like seq but with val inserted at idx (the seq
is extended in either...
internal-do-seqCalls elt-fn on successive elements of seq, possibly restricted by
start and end, and in ...
iteratorReturns an iterator for the collection. (These are stateful iterators and
are not thread-safe; i...
lastReturns the last element of seq, i.e., element (1- (size seq)). This
has methods for CL list...
lessOn a set, removes value1 from it if present, returning the updated set.
On a bag, removes valu...
less-firstReturns the subsequence of seq from element 1 through the end.
less-lastReturns the subsequence of seq from element 0 through the next-to-last
element.
lookupIf collection is a map, returns the value to which key is mapped.
If collection is a seq, t...
rangeReturns the range of the map, that is, the set of all values to which keys
are mapped by the map.
reverseReturns seq in reverse order.
sizeReturns the number of members in a set, seq, or bag, or the number of
pairs in a map. The size o...
sortReturns seq sorted by pred, a function of two arguments; if key is
supplied, it is a functi...
stable-sortReturns seq sorted by pred, a function of two arguments; if key is
supplied, it is a functi...
subseqReturns the subsequence of seq from start (inclusive) to end (exclusive),
where end defau...
verify
withOn a set, adds value1 to it, returning the updated set. On a bag, adds
value2 occurrences of...
with-defaultReturns a new map or seq with the same contents as collection but whose
default is now new-def...
with-firstReturns seq with val prepended, that is, val is element 0 of the
result, and the elements o...
with-lastReturns seq with val appended, that is, val is element (size seq)
of the result.

Other Method

countIf collection is a Lisp sequence, this simply calls cl:count. On an FSet
collection, the def...
count-ifIf collection is a Lisp sequence, this simply calls cl:count-if. On an
FSet collection, the ...
count-if-notIf collection is a Lisp sequence, this simply calls cl:count-if-not.
On an FSet collection, t...
defaultReturns the default for the map or seq, i.e., the value returned by lookup
when the supplied ke...
domain-contains?Returns true iff the domain of the map or seq contains x. (The domain
of a seq is the set of v...
filterReturns a new collection containing those members or pairs of collection
for which fn returns...
findIf collection is a Lisp sequence, this simply calls cl:find. On an FSet
collection, the defa...
find-ifIf collection is a Lisp sequence, this simply calls cl:find-if. On an
FSet collection, the ...
find-if-notIf collection is a Lisp sequence, this simply calls cl:find-if-not.
On an FSet collection, th...
imageReturns a new collection containing the result of applying fn to each
member of collection, w...
positionIf collection is a Lisp sequence, this simply calls cl:position. On an
FSet seq, the default...
position-ifIf collection is a Lisp sequence, this simply calls cl:position-if.
Also works on an FSet seq...
position-if-notIf collection is a Lisp sequence, this simply calls cl:position-if-not.
Also works on an FSet...
range-contains?Returns true iff the range of the map or seq contains x. (The range
of a seq is the set of mem...
reduceIf collection is a Lisp sequence, this simply calls cl:reduce (q.v.).
On an FSet collection, ...
removeIf collection is a Lisp sequence, this simply calls cl:remove. On an
FSet seq, the default f...
remove-ifIf collection is a Lisp sequence, this simply calls cl:remove-if.
Also works on an FSet seq; ...
remove-if-notIf collection is a Lisp sequence, this simply calls cl:remove-if-not.
Also works on an FSet s...
substituteIf collection is a Lisp sequence, this simply calls cl:substitute. On
an FSet seq, the defau...
substitute-ifIf collection is a Lisp sequence, this simply calls cl:substitute-if.
Also works on an FSet s...
substitute-if-notIf collection is a Lisp sequence, this simply calls cl:substitute-if-not.
Also works on an FS...