On Sun, Mar 28, 2010 at 18:29, strattonbrazil <strattonbra...@gmail.com> wrote: > This may be really basic. So much so that it's hard to find on the > internet, but is there something like a copy constructor in clojure,
A copy-constructor is redundant in a language where values are immutable. (Just refer to it since it can never change). > where I can copy everything in a structure except one or two keys? Something like this? (select-keys map keyseq) Returns a map containing only those entries in map whose key is in keys > Maybe something like struct-map, but fills in the other variables not > supplied by another data structure. ? (def another-datastructure {:a 1 :b 2}) (def my-datastructure (assoc another-datastructure :c 3 :d 4)) // Ben -- 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 To unsubscribe from this group, send email to clojure+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.