ST
Size: a a a
ST
ST
ST
EK
EK
ST
SP
SP
SP
ST
(let [xs [:a :b :c :d :a :c]]
(->> xs (into [] (comp (filter (->> (frequencies xs)
(keep (fn [[k v]] (when (< 1 v) k)))
(set)))
(distinct)))))
=> [:a :c]
SP
ST
ST
(let [xs [:a :b :c :d :a :c]]
(loop [xs xs, s #{}, res []]
(if-some [x (first xs)]
(if (s x)
(recur (rest xs) s (conj res x))
(recur (rest xs) (conj s x) res))
res)))
=> [:a :c]
ST
EK
A
DL
A
DL