You can just say: (ns examples.core (:use clarity.component))
This will intern all the symbols in the clarity.component namespace into examples.core, so you can use them as if they were defined in examples.core in the first place: (make :button "the button") This has the disadvantage of potential clashes, if a make function existed in examples.core, it would be overwritten. You can also say: (ns examples.core (:require clarity.component)) This makes the clarity.component namespace symbols available to you, but you still have to fully qualify them: (clarity.component/ make :button "the button") This is a bit long-winded, so you can alias the namespace to something shorter: (ns examples.core (:require [clarity.component :as c])) In which case your code becomes: (c/make :button "the button") So you manage to be concise, but also you keep your namespaces tidily separated :-) Stathis On Dec 13, 9:50 pm, jayvandal <[email protected]> wrote: > I think I understand namespace and then I don't! > I try to run this example > (ns examples.core > (use [clarity.component :as c])) > > (make :button "The Button") > I have programs stored in c:\projects\klarity.clj > I have clojure stored in c:\clojure-1.2.1\clojure-1.21. > I am running c:\cljr\clj-installer-jar > > I tried running > (ns clojure-1.2.1.clojure-1.2.1.src.clojure.core > (use [clarity.component :as c])) > > (make :button "The Button") > > What is namespace suposed to point to or access??? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
