Welcome! Please see the About page for a little more info on how this works.

0 votes
in data.int-map by

The arities of the special union, intersection and difference operations don't match the arities of those in clojure.set.

|operation |clojure.set|int-set|
| :-- | :-- | :-- | :-- |
|union | 0, 1, 2, n | 2 |
|intersection | 1, 2, n | 2 |
|difference | 1, 2, n | 2 |

This prevents using int-sets as a drop-in replacement for sets.

Looking at the source of clojure.set, those seem to be implemented via simple reduce for difference, and bubbled-sets (via bubble-max-key) for union and intersection.

Could a similar approach be used here? I'm willing to work on this.

1 Answer

0 votes
by
Reference: https://clojure.atlassian.net/browse/DIMAP-8 (reported by jbiserkov)
...