Created
November 5, 2014 19:50
-
-
Save samflores/62cacdf10b6f1a4d1ca9 to your computer and use it in GitHub Desktop.
This file contains 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
(def topic-fn [msg] | |
;; this is what I'm thinking about | |
) | |
(def p-ch (chan)) | |
(def p1 topic-fn p-ch) | |
(def s-ch1 | |
(sub p1 :foo s-ch1) | |
(def s-ch2 | |
(sub p2 :foo.bar s-ch2) | |
;; ^-- the topic here is just an idea. any other representation of "nested topics" would be fine | |
(>!! p-ch {:topic :foo.baz}) ;; only s-ch1 would get this | |
(>!! p-ch {:topic :foo.bar}) ;; s-ch1 and s-ch2 would get this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment