0

I would like to convert a string to a form in clojure. Something like

(defn string-to-form [string]
   ;; some magic here
   converted-to-form)

This question has the opposite direction, namely form to string. How to I go the other way?

1
  • 1
    did you tried read-sting..? Commented Mar 24, 2015 at 4:26

1 Answer 1

1

hey if i am correct your want to know

"(+ 1 2)" ;=> (+ 1 2)

if these is you problem then you can use read-string from clojure.core

(defn string-to-form [string] (read-string string))
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.