   (fn []
     (if (has-all-keys? @template-cache names)
       (callback))))
-
-(defn make-template-handler [template-name callback]
-  (fn handler [response]
-    (swap! template-cache assoc template-name response)
-    (callback)))
 
 ;; regex
 (def nonnum "[a-zA-Z\\*\\+!\\-\\_\\?]")

               not)
          x))

(defn split-dbl-brackets
  [t]
  (-> t

              (get-html-template %))
        names))

(defn template->hiccup
  [tmplt state]
  (walk/prewalk (fn [x]
                  (cond (and (vector? x)
                             (= (first x) :om-code)) (get state (second x) "")
                        :else x))
                tmplt))

#_ (-> "<div>{{a}}</div" html->template (template->hiccup {"a" 33}))

#_(html->template "<div>a <span></span></div>")


#_(load-templates ["hello.html"]
                  (fn [n h] (println "in get-html-template") (h "<div></div"))
