Created
April 3, 2014 01:06
-
-
Save yedi/9946510 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
(fn [m stream to-add] | |
(let [val (get (:index stream) m)] | |
(assoc m | |
(:index stream) | |
(if val | |
(conj val to-add) | |
(list to-add)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment