Hi,

On 4 Okt., 04:40, John Harrop <jharrop...@gmail.com> wrote:

> If you need to be creating these things dynamically, with information only
> available at runtime, defstruct is probably the wrong tool for the job, or
> the only struct member should be :name, and the levels at least should just
> be ordinary map keys (not struct keys); then you can dispense with init-funs
> entirely, and replace the call currently used to get a new instance of the
> struct with a call that given a name, figures out the appropriate levels
> (from a name to level-name-list hashmap you maintain at runtime) and
> initializes a structmap with the :name struct-key set appropriately and also
> empty lists for each level-name key appropriate for that name.

I was understanding and using strucs as helpers for creating maps,
sharing the same keys.
Time for reading some clojure books again.

Greets, Benjamin
--~--~---------~--~----~------------~-------~--~----~
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