Hi,
I am trying to create record definitions dynamically during runtime. What I
would like to do is something like this:
(defn mk-rec [record-name namespace arg-list]
(eval '(do (ns namespace)
(defrecord record-name arg-list))))
And then call it like this:
(mk-rec "A" "ns" [a b c])
(->ns.A 1 2 3 )
I am trying out different things, but struggle to get it right or find some
tutorial for it.
So if anyone is willing to share some working code I'd be really happy.
Thanks,
Sven
--
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.