(distinct? x)
(distinct? x y)
(distinct? x y & more)
Returns true if no two of the arguments are =
Source
(defn distinct?
"Returns true if no two of the arguments are ="
{:tag Boolean
:added "1.0"
:static true}
([x] true)
([x y] (not (= x y)))
([x y & more]
(if (not= x y)
(loop [s #{x y} [x & etc :as xs] more]
(if xs
(if (contains? s x)
false
(recur (conj s x) etc))
true))
false)))