I am looking for an efficient collection to store unique symbols (like seteq
but I know everything in there will be a symbol so I would prefer to avoid the O(N) insertion). Is there anything like that out there?
But why can’t you use seteq
?
Why not a hasheq
?
Looking at set-add
’s documentation: > This operation runs in constant time for hash sets. Then following the link for hash sets: > A hash set is a set whose elements are compared via equal?, eqv?, or eq? and partitioned via equal-hash-code, eqv-hash-code, or eq-hash-code.
So wouldn’t symbols and seteq
be O(1) insertion by the above definition?
@kristian.lundstrom has joined the channel
Oof 7am is tough
I think most people are either catching up on sleep, or have stuff to do at 7am
Unless you are using a list set (which you probably shouldn’t)
Absolutely. I was “bitten” by this recently.