@ (and deref) are used to dereference constructs which support multiple values over time; atoms, futures and promises etc. ~@ is a different thing entirely and is used to desplice lists in a macro.
In your example, you aren't in a macro and '() is defining a set, I.e. it isn't a temperal construct. On 20 May 2015 23:43, "Pierre Thibault" <[email protected]> wrote: > For example: > > (def foo '(1 2 3)) > (+ @foo) > > Does not work. I am expecting 6. > > Le mercredi 20 mai 2015 18:37:05 UTC-4, Colin Yates a écrit : >> >> @my-atom is the same as (deref my-atom), is that what you mean? >> On 20 May 2015 23:35, "Pierre Thibault" <[email protected]> wrote: >> >>> Is possible to use the operator '@' alone? In the Joy Of Clojure book it >>> is presented as '~@'. I would like an example. >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Clojure" group. >>> To post to this group, send email to [email protected] >>> Note that posts from new members are moderated - please be patient with >>> your first post. >>> To unsubscribe from this group, send email to >>> [email protected] >>> 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 [email protected]. >>> 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 [email protected] > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > [email protected] > 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 [email protected]. > 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 [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
