 
 (defn table-rows [& rows] (table (map #(row-cells (flatten %)) rows)))
 
-(defn map-table [m] (table (map (fn [[k v]] (tr (td (readable-string k)) (td v))) (sort-by key m))))
+(defn map-table [m] (table (map (comp tr ($lift (comp td readable-string) td)) (sort-by key m))))
 
 (defn definitions [term-map]
 	(dl (mapcat ($lift dt dd) (sort-by key term-map))))


(def empty-css (Css.))

(defn literal? [x] (instance? Literal x))

(defn tag? [x] (instance? Tag x))

(defn css? [x] (instance? Css x))

(defn attrs? [x] (and (map? x) (not (css? x)) (not (tag? x)) (not (literal? x))))

(defn child-item? [x] (not (or (attrs? x) (css? x))))

(defn assoc-attrs [t & key-vals] (apply merge-assoc t :attrs key-vals))

(defn assoc-css [t & key-vals] (apply merge-assoc t :css key-vals))

(defn css [& key-vals] (merge empty-css (apply hash-map key-vals)))


			\" "&quot;"
			\' "&#39;"})))

(defn- readable-string [id] (if (keyword? id) (join " " (map capitalize (split (name id) #"-"))) id))

(defn- $lift [& fs] (partial map #(%1 %2) fs))

;; Core types

