Hello,

Am 07.10.2008 um 23:32 schrieb Brian Doyle:

Yes, I was just being somewhat lazy with this. If I define 10 attributes
for a given struct and wanted to use all of those plus 3 more in a new
struct I didn't want to have to write out those original 10 attributes again.

I'm not sure, that understand what you mean, but you can assign
arbitrary additional keys to structs.

(defstruct foo :a)
(def m (struct foo 5))
; => {:a 5}
(def x (assoc m :b 7))
; => {:a 5 :b 7}
(def y (assoc m :c 1))
; => {:a 5 :c 1}

However you loose the key sharing for this additional keys. Only the
struct keys are shared between the maps.

Sincerely
Meikel

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to