     `(when-not (.hasOwnProperty ~(symbol "js" ns) ~mname)
        (def ~vname ~expr))))
 
-
-;; protocols can have more than one method
-
-;; state is a list of keywords
 (defmacro defcomponent
   "Creates a component with name state and any number of methods
 

     ;; created protocol to a var with metadata describing it's state
     (def ~vname
       (with-meta ~vname {:fields ~state}))))

(defn is-protocol? [sym]
  (boolean (:method-map sym)))

(defmacro defentity
  "A collection of components that represent all aspects of what 

         ~@body)
      (throw (Exception. (str "Duplicate fields found across components. "
                              "Fields must all be unique."))))))
