how to convert a string to a clojure expression? -


i'd send clojure expression in string evaluated @ receiver, might web service written in compojure. example, suppose have string "(* 7 6)", i'd turn '(* 7 6), can pass eval , 42. operation trivial in javascript, not quite sure how in clojure. hints?

this should trick:

(eval (read-string "(* 7 6)")) ;; 42 

or, short:

(load-string "(* 7 6)") ;; 42 

Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -