Guest User

dedupe 2

a guest
Jun 22nd, 2015
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (ns toy.util)
  2. (declare shadow-atom)
  3. (defn bind-conf [CONF]
  4.   (def shadow-atom CONF))
  5. (defn handshake! []
  6.   (make-some-request (:url @CONF)))
  7.  
  8. ;; repo A
  9. (ns toy.core-a
  10.   (:require [toy.util :as util]))
  11. (def conf (atom {:url "http://example1"}))
  12. ;; we don't want to send an argument, because lazy
  13. ;; (util/handshake! @conf)
  14. (util/bind-conf conf)
  15. (util/handshake!)
  16.  
  17.  
  18. ;; repo B
  19. (ns toy.core-b
  20.   (:require [toy.util :as util]))
  21. (def conf (atom {:url "http://example1"}))
  22. (util/bind-conf conf)
  23. (util/handshake!)
Advertisement
Add Comment
Please, Sign In to add comment