Hello. I need to dynamically define records

Suppose I have a record

(defrecord Person [name age])

Then to dynamically construct an instance I do a much more complex
version of

(concat [(symbol "Person.")] ["Peter"] [18])

Where things like Peter and the class of the record are actually the
results of complicated functions but I have just used simple values
here for illustration

The problem is I now have a lazy seq, not a record

I can do an eval

(eval (concat [(symbol "Person.")] ["Peter"] [18]))

But eval is evil. So I think my approach is wrong. Any suggestions
much appreciated

-- 
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

Reply via email to