Skip to content

Instantly share code, notes, and snippets.

Created November 13, 2011 21:14
Show Gist options
  • Save anonymous/1362728 to your computer and use it in GitHub Desktop.
Save anonymous/1362728 to your computer and use it in GitHub Desktop.
;; diegopacheco's solution to Compress a Sequence
;; https://4clojure.com/problem/30
#(reduce (fn[r n]
(if (= n (last r)) r (conj r n)))
(cons [] %1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment