简体   繁体   中英

How to use clojure.string/join in clojurescript

I have the following function:

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

But I always got an error:

Uncaught ReferenceError: clojure is not defined 

You need to include the module in the namespace form:

(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

If you have trouble, try cleaning and restarting the compiler ( lein do cljsbuild clean, cljsbuild auto )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM