   (let [r (cond (= (safe-some-> args first) "local")
               (apply concat (apply
                 (partial map #(list :local 'set! %1 %2))
-                (map next (leave :odd (next args)))))
+                (map next (leave :even (next args)))))
               (= (safe-some-> args first first)
                  :varlist)
               `(do ~@(apply
                 (partial map #(list 'set! %1 %2))
-                (map next (leave :odd args))))
+                (map next (leave :even args))))
               (= "while" (first args))
               (get-while-statement args)
               (= "repeat" (first args))


(def third #(nth %1 2))
(def fourth #(nth %1 3))

(defn leave [odd-or-even-kw items]
  (map second (remove #((if (= odd-or-even-kw :odd) odd? even?) (first %1)) (map #(vector %1 %2) (range) items))))

(comment
  (let [s [[{:a 1} ['(set! a 3) :b #{'('(set! b 4))}]] ['(['(set! a 6)])]]

   :exp exp-fn
   :prefixexp prefixexp-fn
   :var var-fn
   :field field-fn
   :fieldlist fieldlist-fn
   :tableconstructor tableconstructor-fn
   :args args-fn
   :functioncall functioncall-fn
   :explist explist-fn
   :varlist varlist-fn
   })

(comment
  
(pprint (lua-parser (slurp "resources/test/basic.lua")))

(eval (insta/transform transform-map (lua-parser (slurp "resources/test/for.lua"))))
