I'm learning Clojure by following the Hackerrank 30 days of code, and lost some hours due to a behavior I neither understand nor found any documentation or explanation about:
(read)returns a symbol:user=> (def key-read (read)) sam #'user/key-read user=> (type key-read) clojure.lang.Symbol(read-line)returns a stringuser=> (def key-line (read-line)) sam #'user/key-line user=> (type key-line) java.lang.String
As a result, parsing a line with (read) (read) to get map keys and values results in the keys to be symbols, than will never be matched by a further (read-line).
Why is this so? And also, where can I find the return value? (this is not documented in (doc read)).