目录

find-ns

查找并返回特定的命名空间。

语法 (Syntax)

以下是语法。

(find-ns namespace-name)

Parameters - 'namespace-name'是需要找到的命名空间。

Return Value - 命名空间(如果存在)。

例子 (Example)

以下是Clojure中find-ns的示例。

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

输出 (Output)

上述程序产生以下输出。

#object[clojure.lang.Namespace 0x6d3a388c clojure.string]
↑回到顶部↑
WIKI教程 @2018