Skip to content

Instantly share code, notes, and snippets.

@yedi
Created April 3, 2014 01:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yedi/9946510 to your computer and use it in GitHub Desktop.
Save yedi/9946510 to your computer and use it in GitHub Desktop.
(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