Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(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
You can’t perform that action at this time.