Skip to content

Instantly share code, notes, and snippets.

@bhenry
Created November 3, 2010 15:48
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 bhenry/b16af68b7e6482734992 to your computer and use it in GitHub Desktop.
Save bhenry/b16af68b7e6482734992 to your computer and use it in GitHub Desktop.
(ns karras
"A namespace that can be used to pull in everything you need for karras.
Since karras names don't collide, it's preferable to 6 lines of uses and more
imports, etc.
TODO: consider giving the bare minimum as a default with optional
args to add more if needed.."
(:use karras.core
karras.collection
karras.sugar
karras.utils))
(defmacro use-karras
"Macro that will use karras' namespaces, to provide an easy to access toolkit"
[]
'(do
(clojure.core/use
'karras.core
'karras.collection
'karras.sugar
'karras.utils)))
(use-karras)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;in some other file or project with karras on the classpath...
(ns other.namespace
(:use karras))
;;still have to call (use-karras) in order to get what's in karras.sugar etc.
;;can i avoid that call? would the reload flag evaluate (use-karras) in the current namespace?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment