(defn group-container-args [args]
(reduce
(fn [{options :options kw :kw state :state :as r} arg]
(cond
(= state :forms)
(update-in r [:forms] conj arg)
kw
(assoc r :options (assoc options kw arg) :kw nil)
(keyword? arg)
(assoc r :kw arg)
(vector? arg)
(assoc r :bindings arg :state :forms)))
{:options {} :kw nil :state :options :forms []} args))
Comments top
No comments for group-container-args. Log in to add a comment.