Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (ns toy.util)
- (declare shadow-atom)
- (defn bind-conf [CONF]
- (def shadow-atom CONF))
- (defn handshake! []
- (make-some-request (:url @CONF)))
- ;; repo A
- (ns toy.core-a
- (:require [toy.util :as util]))
- (def conf (atom {:url "http://example1"}))
- ;; we don't want to send an argument, because lazy
- ;; (util/handshake! @conf)
- (util/bind-conf conf)
- (util/handshake!)
- ;; repo B
- (ns toy.core-b
- (:require [toy.util :as util]))
- (def conf (atom {:url "http://example1"}))
- (util/bind-conf conf)
- (util/handshake!)
Advertisement
Add Comment
Please, Sign In to add comment