简体   繁体   中英

How to use libraries in Clojure in LightTable

I have the following Clojure code in LightTable

(ns exercise
  (:require [clojure.string :as str]))

(defn -main
  [& args]
  (def str1 "Hello world")
  (str/includes? str1 "world")
)

When i try to run it i get the following exception: clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: No such var: str/includes?

Am i importing the library wrong or is something else wrong ?

You're probably using an old Clojure version. includes? was added in 1.8 .

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