4.3 Seqs and Strings

Along with using heterogeneous trees to save space, the seq implementation tries to save even more space by using strings, when possible, for the short leaf vectors. This is possible when the contiguous sequence of up to 8 consecutive elements of the seq that happen to wind up in a particular leaf vector are all characters. In Lisp implementations where base-char is distinct from character, FSet will even use base-strings when possible. The upshot is:

Since seqs have log-time concatenation and subsequence operations, they can actually be very useful for string manipulation.