namespace

clojure.core

  • (namespace x)
Returns the namespace String of a symbol or keyword, or nil if not present.

1 Example top

  • user=> (def x "Foobar")
    #'user/x
    
    user=> (namespace 'user/x)
    "user"
    
Log in to add / edit an example.

See Also top

  • 0
    clojure.core/ns

    Sets *ns* to the namespace named by name (unevaluated), creating it

  • 0
    clojure.core/name

    Returns the name String of a string, symbol or keyword.

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:1490 top

(defn namespace
  "Returns the namespace String of a symbol or keyword, or nil if not present."
  {:tag String
   :added "1.0"
   :static true}
  [^clojure.lang.Named x]
    (. x (getNamespace)))
Vars in clojure.core/namespace:
Used in 0 other vars

Comments top

No comments for namespace. Log in to add a comment.