Clojure – ns-name

Clojure ns-name

In this guide, we will discuss Clojure ns-name. Returns the name of a particular namespace.

Syntax

Following is the syntax.

(ns-name namespace-name)

Parameters − ‘namespace-name’ is the namespace which needs to be found.

Return Value − The actual name of the namespace.

Example

Following is an example of ns-name in Clojure.

(ns clojure.examples.example
   (:require [clojure.set :as set])
   (:gen-class))
(defn example []
   (println (ns-name 'clojure.string)))
(example)

Output

The above program produces the following output.

clojure.string

Next Topic : Click Here

This Post Has 2 Comments

Leave a Reply