(defn parse-item-constraints
"Iterates over args and builds a map containing values associated with
:keywords and :components. The value for :keywords is a map from keyword
items to constraints strings. The value for :components is a vector of
vectors each associating a component with its constraints string."
[& args]
(loop [[item & args] args
item-constraints {:keywords {} :components []}]
(if item
(let [[constraints args] (split-with constraint? args)]
(recur args
(update-in
item-constraints
[(if (component? item) :components :keywords)]
conj [item (apply format-constraints constraints)])))
item-constraints)))
Used in 0 other vars
Comments top
No comments for parse-item-constraints. Log in to add a comment.