 ;;;;; COLLECTION TYPES ;;;;;
 
 (defmethod canonize clojure.lang.ISeq
-  [s]
-  (let [elements (if (symbol? (first s))
-                   (cons (color-doc :function-symbol (str (first s)))
-                         (map canonize (rest s)))
-                   (map canonize s))]
+  [value]
+  (let [elements (if (symbol? (first value))
+                   (cons (color-doc :function-symbol (str (first value)))
+                         (map canonize (rest value)))
+                   (map canonize value))]
     [:group
      (color-doc :delimiter "(")
      [:align (interpose :line elements)]



(defmethod canonize clojure.lang.IPersistentVector
  [v]
  [:group
   (color-doc :delimiter "[")
   [:align (interpose :line (map canonize v))]
   (color-doc :delimiter "]")])


(defmethod canonize clojure.lang.IPersistentSet
  [s]
  (let [entries (sort order/rank (seq s))]
    [:group
     (color-doc :delimiter "#{")
     [:align (interpose :line (map canonize entries))]



(defmethod canonize clojure.lang.IPersistentMap
  [value]
  (canonize-map value))


(defmethod canonize clojure.lang.IRecord
  [value]
  (illegal-when-strict value)
  [:span
   (color-doc :delimiter "#")
   (.getName (class value))
   (canonize-map value)])


(prefer-method canonize clojure.lang.IRecord clojure.lang.IPersistentMap)
