Re: How to create structure with a seq of keys

2009-08-10 Thread Dragan Djuric
Thanks. (I discovered the solution shortly after posting here, but there is that annoying delay until the message is approved by mods, so I couldn't answer my question...) On Aug 10, 2:55 am, David Nolen wrote: > Sounds like you want apply: > (apply fn args) > > On Sun, Aug 9, 2009 at 4:28 PM,

Re: How to create structure with a seq of keys

2009-08-10 Thread John Harrop
On Sun, Aug 9, 2009 at 8:55 PM, David Nolen wrote: > Sounds like you want apply: > (apply fn args) > Indeed. Since create-struct (not create-structure!) is a function, this should work. It wouldn't work with a macro, though. --~--~-~--~~~---~--~~ You received th

Re: How to create structure with a seq of keys

2009-08-09 Thread David Nolen
Sounds like you want apply: (apply fn args) On Sun, Aug 9, 2009 at 4:28 PM, Dragan Djuric wrote: > > Hi, > > I would like to achieve something like this: > > (def k [:key1 :key2 :key3]) > (def mystruct (create-structure k)) > > Unfortunately, create structure treats the whole vector of params (or

How to create structure with a seq of keys

2009-08-09 Thread Dragan Djuric
Hi, I would like to achieve something like this: (def k [:key1 :key2 :key3]) (def mystruct (create-structure k)) Unfortunately, create structure treats the whole vector of params (or any other seq) as one element, so the resulting list will have only one composite key [:key1 :key2 :key3] instea