Hi everyone

I am very new to clojure and have worked previously on C/C++

I wanted to do some string operations, where I can match occurrence of
a particular string. However, I get this error everytime.

java.lang.ClassCastException: clojure.lang.Var cannot be cast to
java.lang.CharSequence (myseq.clj:0)

Here is the code, which is quite lame but is just made for learning
purpose.

(def myseq "the quick brown fox")
(loop [word myseq]
(if (= (first (re-seq #"\w+" word)) "fox") (println "Yeah!!")
(recur (def myseq (apply str (interpose " " (rest (re-seq #"\w+"
myseq))))))))

Kindly tell me what is the problem.

Aridaman

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to