Created
June 20, 2014 20:28
-
-
Save jwhitlark/9b99e6448067e35f79b9 to your computer and use it in GitHub Desktop.
Two utility fn's
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn listen [el & types] | |
(let [out (chan)] | |
(doall (map (fn [type] (events/listen el type #(put! out %))) types)) | |
out)) | |
(defn set-states! [owner desired] | |
(doall (map #(om/set-state! owner (key %) (val %)) desired))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment