Stefan,
Thank you for your reply. You are referring to applying an annotation to an
instance/object.
If we could imagine it existed for the moment, this is what I'd be looking
for:
(meta {:foo "meta"} (defrecord Foo (bar baz)))
I should then somehow be able to retrieve the metadata of the type
definition, given an instance of it. In other words, given an instance of
record Foo, I should be able to get to the metadata of its defrecord
definition.
Maybe I should post my solution to this problem here?
Thanks!
Jacques
On Tuesday, May 15, 2012 4:51:15 PM UTC+2, Stefan Kamphausen wrote:
>
> Hi,
>
> I am not sure whether I fully understand your question. However, when you
> create a record, a second constructor will be created for you which also
> expects a meta-data map:
>
> user=> (defrecord Foo (bar baz))
> user=> (meta (Foo. 2 3 {:foo "meta"} nil))
> {:foo "meta"}
>
>
> Hope that helps.
> Stefan
>
--
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