Skip to content

Instantly share code, notes, and snippets.

@amalloy
Created January 10, 2011 21:35
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 amalloy/b4ff52ae5f0d50db15bd to your computer and use it in GitHub Desktop.
Save amalloy/b4ff52ae5f0d50db15bd to your computer and use it in GitHub Desktop.
(let [route-manager (atom (fn [request]
(inc request)))] ; or whatever
(start-server (fn [request]
(@route-manager request)))
;; do stuff that uses inc function
(reset! route-manager (fn [request]
(dec request)))
;; do stuff that uses dec function
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment