Cast to vector for clarity
This commit is contained in:
@@ -24,7 +24,7 @@ function.
|
|||||||
([screen-object]
|
([screen-object]
|
||||||
(-> screen-object :entities deref))
|
(-> screen-object :entities deref))
|
||||||
([screen-object filter-fn]
|
([screen-object filter-fn]
|
||||||
(filter filter-fn (e screen-object))))
|
(vec (filter filter-fn (e screen-object)))))
|
||||||
|
|
||||||
(defn e!
|
(defn e!
|
||||||
"Resets the entities in `screen-object`, or associates values to the entities
|
"Resets the entities in `screen-object`, or associates values to the entities
|
||||||
@@ -38,8 +38,8 @@ were changed.
|
|||||||
([screen-object filter-fn & args]
|
([screen-object filter-fn & args]
|
||||||
(swap! (:entities screen-object)
|
(swap! (:entities screen-object)
|
||||||
(fn [entities]
|
(fn [entities]
|
||||||
(for [e entities]
|
(vec (for [e entities]
|
||||||
(if (filter-fn e)
|
(if (filter-fn e)
|
||||||
(apply assoc e args)
|
(apply assoc e args)
|
||||||
e))))
|
e)))))
|
||||||
(e screen-object filter-fn)))
|
(e screen-object filter-fn)))
|
||||||
|
|||||||
Reference in New Issue
Block a user