Skip to content

Instantly share code, notes, and snippets.

@maxcountryman
Last active December 15, 2015 08:08
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 maxcountryman/5228259 to your computer and use it in GitHub Desktop.
Save maxcountryman/5228259 to your computer and use it in GitHub Desktop.
Assume these files live in a dir `testing`.
(ns testing.bar (:require [baz :refer :all]))
;; should expose the same function as foo, i.e. qux
(ns testing.baz)
(defn qux [s] s)
(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