Merge pull request #1204 from Kodiologist/eval-str

Docs: add an example of evaluating a string
This commit is contained in:
Paul Tagliamonte 2017-01-19 12:31:01 -05:00 committed by GitHub
commit 1fc3507115

View File

@ -812,6 +812,15 @@ defaults to the name of the current module.
=> (eval '(print "Hello World"))
"Hello World"
If you want to evaluate a string, use ``read-str`` to convert it to a
form first:
.. code-block:: clj
=> (eval (read-str "(+ 1 1)"))
2
eval-and-compile
----------------