   (:use hiccup.core
         hiccup.page
         ring.util.response)
-  (:import [clojure.lang APersistentMap Sequential]
+  (:import [clojure.lang APersistentMap Sequential PersistentHashMap$ArrayNode$Seq PersistentHashMap]
            [java.util Map])
   (:require [clojure.string :as s]
             [io.aviso

(extend-type Map
  MarkupGeneration
  (to-markup
    [m]
    (html
      (if (.isEmpty m)
        [:em "empty map"]
        [:dl
         (apply concat
                (for [k (-> m .keySet sort)]
                  [[:dt (to-markup k)] [:dd (-> (.get m k) to-markup)]]
                  ))
         ]))))

(defn- element->clojure-name [element]
  (let [names (:names element)]

        [:em "empty map"]
        [:dl
         (apply concat
                (for [[k v] (sort-by str m)]
                  [[:dt (to-markup k)] [:dd (to-markup v)]]
                  ))
         ]))))

