#31
Pack a Sequence
 

Difficulty:N/A
Topics:easy seqs


Write a function which packs consecutive duplicates into sub-lists.
test not run
(= (__ [1 1 2 1 1 1 3 3]) '((1 1) (2) (1 1 1) (3 3)))
test not run
(= (__ [:a :a :b :b :c]) '((:a :a) (:b :b) (:c)))
test not run
(= (__ [[1 2] [1 2] [3 4]]) '(([1 2] [1 2]) ([3 4])))


Code which fills in the blank: