Docs: add an example of evaluating a string

This commit is contained in:
Kodi Arfer 2017-01-19 09:26:12 -08:00
parent dda456ddd9
commit 2dd1432b07

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
----------------