clojure.set/union is very sensitive to the types of its inputs. It does not attempt to check or fix the input types, raise an error, or even document this behavior.
If all inputs are sets, it works.
`
ti.repl-init=> (clojure.set/union #{1 2 3} #{1 2 3 4})
{1 4 3 2}
`
If the arguments are both vectors or sequences, it returns the same type with duplicates.
ti.repl-init=> (clojure.set/union [1 2 3] [1 2 3])
[1 2 3 1 2 3]
ti.repl-init=> (clojure.set/union (list 1 2 3) (list 1 2 3))
(3 2 1 1 2 3)
If the arguments are mixed, the correct result is returned only if the longest input argument is a set.
`
ti.repl-init=> (clojure.set/union #{1 2 3} [2 3])
{1 3 2}
ti.repl-init=> (clojure.set/union [1 2 3] #{2 3})
[1 2 3 3 2]
ti.repl-init=> (clojure.set/union [2 3] #{1 2 3})
{1 3 2}
ti.repl-init=> (clojure.set/union #{2 3} [1 2 3])
[1 2 3 3 2]
`