Last active
December 15, 2015 08:08
-
-
Save maxcountryman/5228259 to your computer and use it in GitHub Desktop.
Assume these files live in a dir `testing`.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns testing.bar (:require [baz :refer :all])) | |
;; should expose the same function as foo, i.e. qux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns testing.baz) | |
(defn qux [s] s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns testing.foo (:require [baz :refer :all])) | |
;; qux is available as a var only from the scope of this file, | |
;; however we would like to expose it to programs that invoke | |
;; foo as a library like this: | |
;; | |
;; => (require '[testing.foo :as foo]) | |
;; => (foo/qux "test") | |
;; "test" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment