Skip to content

Instantly share code, notes, and snippets.

@tychobrailleur
Last active June 17, 2020 22:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tychobrailleur/0fb3dd33259ec375f792774c73856076 to your computer and use it in GitHub Desktop.
Save tychobrailleur/0fb3dd33259ec375f792774c73856076 to your computer and use it in GitHub Desktop.
Challenge #382
(defn uniques [v]
(->> v
(frequencies)
(filter #(<= (second %) 1))
(map first)))
(uniques [1 2 3 4 5 6 1 2 3 5 6]) ;=> (4)
(uniques [:a :b :c :c]) ;=> (:a :b)
(uniques [1 2 3 1 2 3]) ;=> ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment