On Sun, Sep 20, 2009 at 6:20 PM, samppi <[email protected]> wrote:
>
> I was messing with the REPL when I found this happens:
>
> Clojure 1.0.0-
> user=> (def a #^{:a 5} [1 2 3])
> #'user/a
> user=> ^a
> {:a 5}
> user=> (def b #^{:b 2} '(1 2 3))
You have a quote symbol in there, so that line can also be written as:
(def b #^{:b 2} (quote (1 2 3)))
> #'user/b
> user=> ^b
> {:line 3}
> user=> (def c (with-meta '(1 2 3) {:c 0}))
> #'user/c
> user=> ^c
> {:c 0}
>
> What's going on with that {:line 3}? Is it something that the REPL is
> doing? Where did {:b 2} go? And why does it happen with the reader
> macro #^ and not with-meta?
> >
>
--
Venlig hilsen / Kind regards,
Christian Vest Hansen.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---