(defn class
"Normalize `class` into a vector of classes."
[class]
(cond
(nil? class)
nil
(map-lookup? class)
[class]
(list? class)
(if (symbol? (first class))
[class]
(map class-name class))
(symbol? class)
[class]
(string? class)
[class]
(keyword? class)
[(class-name class)]
(and (or (set? class)
(sequential? class))
(every? #(or (keyword? %)
(string? %))
class))
(mapv class-name class)
(and (or (set? class)
(sequential? class)))
(mapv class-name class)
:else class))