Permalink
Browse files

Expand list on dom/trans

  • Loading branch information...
1 parent d592ef6 commit b25cb16ca8bfcfaede0b8803c13d22ec2a08858f @zk committed Mar 11, 2013
Showing with 14 additions and 13 deletions.
  1. +14 −13 src/cljs/nsfw/dom.cljs
@@ -381,16 +381,17 @@
(done))))
el))
-(defn trans [el & os]
- (let [os (loop [os os out []]
- (let [fo (first os)
- so (second os)]
- (if-not so
- (conj out fo)
- (recur (rest os)
- (conj out (assoc fo
- :done (fn []
- ((or (:done fo) #()))
- (trans* el so))))))))]
- (trans* el (first os))
- el))
+(defn trans [els & os]
+ (doseq [el (ensure-coll els)]
+ (let [os (loop [os os out []]
+ (let [fo (first os)
+ so (second os)]
+ (if-not so
+ (conj out fo)
+ (recur (rest os)
+ (conj out (assoc fo
+ :done (fn []
+ ((or (:done fo) #()))
+ (trans* el so))))))))]
+ (trans* el (first os))
+ el)))

0 comments on commit b25cb16

Please sign in to comment.