Union, intersection and difference have only 2 arguments versions

Description

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.

Environment

None

Assignee

Zach Tellman

Reporter

bitbucket