Delay xforms applications to not share state.

This commit is contained in:
Christophe Grand 2015-09-15 14:32:30 +02:00
parent e92feae40a
commit 378ea13118

View file

@ -301,10 +301,11 @@
Returns a map with the same keyset as xforms-map (or a vector of same size as xforms-map).
Returns a transducer when coll is omitted."
([xforms-map]
(let [rf (if (vector? xforms-map)
(apply juxt (map #(% just) xforms-map))
(apply juxt-map (sequence (comp (by-key (map #(% just))) cat) xforms-map)))]
(reduce rf)))
(let [[f args] (if (vector? xforms-map)
[juxt (map #(% just))]
[juxt-map (comp (by-key (map #(% just))) cat)])]
(fn [rf]
((reduce (apply f (sequence args xforms-map))) rf))))
([xforms-map coll]
(transduce (transjuxt xforms-map) just coll)))