Created
June 21, 2015 11:52
-
-
Save ifesdjeen/df779350e6f433db90fc to your computer and use it in GitHub Desktop.
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
(let [channel (create) | |
incremented-values (map* inc channel) | |
decremented-values (map* dec channel)] | |
(consume incremented-values (fn [i] (println "Incremented value: " i))) | |
(consume decremented-values (fn [i] (println "Decremented value: " i))) | |
(accept channel 1) | |
(accept channel 2) | |
(accept channel 3) | |
(ms/flush channel)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment