 ;; ---------------------------------------------------------------------
 ;; View helpers
 
-(declare view)
-
-(defn- literal [class x]
+(declare collection-view)
+
+(defn literal [class x]
   (dom/span #js {:className class :key x}
     (pr-str x)))
 
 (defn coll-view [data opener closer class]
-  (om/build view data
+  (om/build collection-view data
     {:opts {:opener opener :closer closer :class class}}))
 
-(defn inspect* [x]
+(defn inspect [x]
   (cond
     (satisfies? IInspect x)
     (-inspect x)

          (dom/span #js {:className (str "key " key-class) 
                         :style #js {:display "inline-block"
                                     :verticalAlign "top"}}
            (inspect* k))
          (dom/span #js {:style #js {:display "inline-block"
                                     :width "1em"}})
          (dom/span #js {:className (str "val " val-class)
                         :style #js {:display "inline-block"
                                     :verticalAlign "top"}}
            (inspect* v)))))))

(defn- sequential->dom [data]
  (into-array
    (for [[i x :as pair] (map-indexed vector data)]
      (dom/li #js {:className "entry"
                   :key (str pair)}
        (inspect* x)))))

(defn- coll->dom [data]
  (cond
   (map? data)
   (associative->dom data {:entry-class "map-entry"

(ns ankha.core
  (:refer-clojure :exclude [empty? inspect])
  (:require
   [om.core :as om :include-macros true]
   [om.dom :as dom :include-macros true]
   [clojure.string :as string]
   [goog.object :as object]))

(enable-console-print!)

