Skip to content

Instantly share code, notes, and snippets.

@billdozr
Created February 17, 2010 12:40
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 billdozr/306565 to your computer and use it in GitHub Desktop.
Save billdozr/306565 to your computer and use it in GitHub Desktop.
(defn update-guest [new]
(let [old (fetch-guest-by-invite-code (:invite_code new))
event (fetch-event-by-guest (:invite_code new))]
(update-event
(update-in event
[:guests]
(fn [o n]
(conj (filter
#(not= (:invite_code %) (:invite_code n)) o) n))
new))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment