Skip to content

Instantly share code, notes, and snippets.

@lagenorhynque
Created March 25, 2018 04:59
Show Gist options
  • Select an option

  • Save lagenorhynque/87f625fc34e50fae9846e21ab7211cbe to your computer and use it in GitHub Desktop.

Select an option

Save lagenorhynque/87f625fc34e50fae9846e21ab7211cbe to your computer and use it in GitHub Desktop.
(println
(loop [lines (rest (line-seq (clojure.java.io/reader *in*)))
numbers #{}]
(if (empty? lines)
(count numbers)
(let [n (first lines)]
(recur (rest lines)
(if (contains? numbers n)
(disj numbers n)
(conj numbers n)))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment