(defn all
"Assumes that itms is a list of state monad function results, threads the state map
through all of them. Returns a vector of all the results."
[itms]
(fn [plan]
(reduce
(fn [[ids plan] f]
(let [[id plan] (f plan)]
[(conj ids id) plan]))
[[] plan]
itms)))