Skip to content

Instantly share code, notes, and snippets.

@podviaznikov
Last active December 26, 2015 06:39
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 podviaznikov/7109890 to your computer and use it in GitHub Desktop.
Save podviaznikov/7109890 to your computer and use it in GitHub Desktop.
Find integer without a pair in the sequence. Clojure implementation.
(defn finditemwithoutpair [data]
(if (= 1 (count data))
(first data)
(if (= (first data) (second data))
(finditemwithoutpair (drop 2 data))
(first data))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment