On Aug 6, 5:35 pm, David <
dsieg...@yahoo.com> wrote:
> I'm missing something.
>
Yes, (sorted-set []) creates a sorted-set with a single item, an empty
vector, to which you are trying to add a string. (sorted-set) creates
an empty sorted set.
> This is a piece of a larger example. I want to create an empty sorted-
> set
> and add strings to it. Since the only items I put into the sorted set
> are strings, why is anything being compared to PersistentVector? I
> expected the only comparisons to be between strings.
>
> Shouldn't a sorted-set containing only strings be allowed?
Certainly. This will do what you want:
(conj (sorted-set) "a")
or simply (sorted-set "a")
Rich