Monday, January 15, 2018

Clojure: remove consecutive duplicates from a sequence

(#(map first (partition-by identity %)) [1 1 2 3 3 2 2 3])
[1 2 3 2 3]