Sometimes text in comments in ClojureDocs.org examples can be more useful
than the examples.  They are effectively longer (unofficial) doc strings.

Andy

On Thu, Jan 31, 2019 at 5:36 AM Alex Miller <a...@puredanger.com> wrote:

> Go for it. Not sure the type stuff is adding anything in the context of
> quote examples here beyond the other explanation though.
>
> On Thu, Jan 31, 2019 at 6:50 AM Rostislav Svoboda <
> rostislav.svob...@gmail.com> wrote:
>
>> Hi Alex,
>>
>> > quote is a special form that returns the value you pass it, without
>> evaluation
>>
>> Aah! "without evaluation" is the key! Now it makes sense. Yea you
>> mentioned it before already, but it takes twice the effort to undo and
>> re-comprehend an acquired misconception. Thank you so much!
>>
>> Would you mind if I add this example to
>> http://clojuredocs.org/clojure.core/quote ?
>> It's basically your explanation in the REPL.
>>
>> ;; Quote returns the argument you pass it, without evaluation. So:
>> ;; In the expression `(quote 42)` the argument is the number 42 and...
>> user> (= (quote 42) 42)
>> true         ;; ... it is returned without any evaluation and...
>> user> (= (type (quote 42)) (type 42) java.lang.Long)
>> true         ;; ... as expected, without changing it's type.
>>
>> ;; In the expression `(quote (quote 42))` the argument is the list of
>> two elements
>> ;; `(quote 42)` and...
>> user> (= (quote (quote 42)) (list (read-string "quote") (read-string
>> "42")))
>> true         ;; ... and it is returned without any evaluation and...
>> user> (= (type (quote (quote 42))) (type (list "1st-elem" "2nd-elem"))
>>          clojure.lang.PersistentList)
>> true         ;; ... again, without changing it's type.
>>
>>
>> Bost
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Clojure" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/clojure/K74chBn4Pis/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to