braveandtrue

https://www.braveclojure.com/
moo 2018-09-03T15:24:19.000100Z

Hi guys, am I missing something here for ex. 1 in ch7.

(eval (list (quote println)
            "Moo likes the Lord of the Rings Movie!"))
The ex. says to use eval, list and read-string. Somehow I don’t see how to use all three!

moo 2018-09-03T15:24:48.000100Z

for example: I could replace quote for read-string and put println in quotes.

moo 2018-09-03T15:24:59.000100Z

but, that’s still missing one.

_rj_r_ 2018-09-03T15:47:41.000100Z

@jm.moreau use read-string in place of quote and put the println in quotes.

(list (read-string "println") "hello!") => (println "hello!")
This creates a list with two elements, then adding eval, evaluates the form:
(eval (list (read-string "println") "hello!")) => hello!

👍 1