                  (map #(% defs) names))))
 
 (def builtins ["def" "defn" "ns" "atom" "let" "if" "when"
-               "cond" "merge" "assoc" "swap!" "reset!"])
+               "cond" "merge" "assoc" "swap!" "reset!" "for"
+               "range" "nil\\?" "int" "or" "->" "%"])
 
 (defn syntaxify [src]
   (let [sep "\\][(){} \\t\\n"
         str-p "\"[^\"]*\""
         keyw-p (str ":[^" sep "]+")
-        res-p (string/join "|" (map #(str % "(?=[" sep "])") builtins))
-        any-p ".|\\n"
+        res-p (string/join "|" (map #(str "\\b" % "(?=[" sep "])") builtins))
+        any-p (str "[^" sep "]+|.|\\n") ;; ".|\\n"
         patt (re-pattern (str "("
                               (string/join ")|(" [str-p keyw-p res-p any-p])
                               ")"))]

  [:div
   "The atom " [:code "click-count"] " has value: "
   @click-count ". "
   [:input {:type "button"
            :value "Click me!"
            :on-click #(swap! click-count inc)}]])

(defn local-state []
  (let [val (atom "foo")]
    (fn []
      [:div
       [:p "The value is now: " @val]
       [:p "Change it: "
        [:input
         {:type "text" :value @val
          :on-change #(reset! val (-> % .-target .-value))}]]])))

(defn timer-component []
  (let [seconds-elapsed (atom 0)]

   [:p "Sometimes you may want to maintain state locally in a
   component. That is easy to do with an " [:code "atom"] " as well."]

   [:p "Here is an example of that, where we call setTimeout every
   time the component is rendered to update a simple clock:"]
   
   [demo-component {:comp timer-component
                    :defs [:timer-component]}]
   
   [:p "The previous example also uses another feature of Cloact: a component
   function can return another function, that is used to do the actual
   rendering. It is called with the same arguments as any other
