I'm trying to learn Clojure and I'm starting with some basics such as functions, concatenation, lexicon replacement, etc. The one I'm stuck on currently is replacement. I've created a function called test that accepts two parameters v and v2; it's purpose is to replace periods with whitespace using clojure.string/replace:
(defn replace-lexicon [value lexicon replacementValue]
(println str(clojure.string/replace value lexicon replacementValue)))
(replace-lexicon "this.is.a.test" "." " ")
The expected output is:
this is a test
However, the output has additional information with it:
#object[clojure.core$str 0x35aea049 clojure.core$str@35aea049] this is a test
I tried searching for answers on how to remove it, but I'm not finding anything conclusive. Drawing on my experience with other languages, I can't help but feel this is demonstrating that what's being printed isn't a string but rather an object. Unfortunately though, this is just an educated guess, and, I haven't been able to prove it.
What is #object..., and how do I remove it to correct my output?