Skip to content

Instantly share code, notes, and snippets.

@jaycfields
Created September 29, 2012 13:27
Show Gist options
  • Save jaycfields/3804008 to your computer and use it in GitHub Desktop.
Save jaycfields/3804008 to your computer and use it in GitHub Desktop.
solved with my-fn
(defn my-fn [result {:keys [name employer]}]
(update-in result [employer] conj name))
(reduce my-fn {}
[{:name "jay fields", :current-city "new york", :employer "drw.com"}
{:name "john dydo", :current-city "new york", :employer "drw.com"}
{:name "mike ward", :current-city "chicago", :employer "drw.com"}
{:name "chris george", :current-city "new york", :employer "thoughtworks.com"}])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment