【问题标题】:How to use clojure.string/join in clojurescript如何在 clojurescript 中使用 clojure.string/join
【发布时间】:2014-05-19 21:11:20
【问题描述】:

我有以下功能:

(defn join [a] (clojure.string/join  " " a))

但我总是报错:

Uncaught ReferenceError: clojure is not defined 

【问题讨论】:

    标签: clojure clojurescript


    【解决方案1】:

    您需要在命名空间表单中包含模块:

    (ns my-app.core
      (:require [clojure.string :as string]))
    
    (clojure.string/blank? "")
    
    (string/blank? "")
    

    https://github.com/swannodette/lt-cljs-tutorial/blob/master/lt-cljs-tutorial.cljs#L22-L33

    如果遇到问题,请尝试清理并重新启动编译器 (lein do cljsbuild clean, cljsbuild auto)

    【讨论】:

      猜你喜欢
      • 2017-06-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多