 ;; so we must pack only neibours
 
 (defn __ [coll]
-  coll)
+  (partition-by identity coll))
 
 (= (__ [1 1 2 1 1 1 3 3]) '((1 1) (2) (1 1 1) (3 3)))
 

(= (__ [[1 2] [1 2] [3 4]]) '(([1 2] [1 2]) ([3 4])))


(list-contains? 10 '(100 101 102))
(defn pack [result x]
  (if (empty? result)
    (conj result [x])
    (if (list-contains? x (last result))
      (assoc result (dec (count result)) (conj (last result) x)))))

;; (pack [1] 1)

;; (reduce pack [] [1 1 2 1 1 1 3 3])
;; [[1] [1] [2] [1] [1] [1] [3] [3]]

(set [[1] [1] [2] [1] [1] [1] [3] [3]])
