Re: Achieving structural sharing when composing data

2014-05-05 Thread Mike Fikes
ue >> >> If the maps themselves need to be shared, you'll have to make your own >> version of assoc, dissoc, maybe conj & into, etc etc, and remember to >> always use them. It could get complicated. >> >> --Leif >> >> On Saturday, May 3, 2014 1

Re: Achieving structural sharing when composing data

2014-05-05 Thread Alex Miller
sion of assoc, dissoc, maybe conj & into, etc etc, and remember to > always use them. It could get complicated. > > --Leif > > On Saturday, May 3, 2014 10:27:29 PM UTC-4, Mike Fikes wrote: >> >> Are there common techniques or idioms for achieving structural shar

Re: Achieving structural sharing when composing data

2014-05-04 Thread Leif
ed to be shared, you'll have to make your own version of assoc, dissoc, maybe conj & into, etc etc, and remember to always use them. It could get complicated. --Leif On Saturday, May 3, 2014 10:27:29 PM UTC-4, Mike Fikes wrote: > > Are there common techniques or idioms for achie

Re: Achieving structural sharing when composing data

2014-05-04 Thread Gary Trakhman
ing structural sharing > when composing data where equivalences exist? > > (My motivation is to reduce heap usage for a particular problem I'm > working on that involves a lot of repeated data.) > > As a specific example, consider sharing equivalent map values: > > (def m1 {

Achieving structural sharing when composing data

2014-05-03 Thread Mike Fikes
Are there common techniques or idioms for achieving structural sharing when composing data where equivalences exist? (My motivation is to reduce heap usage for a particular problem I'm working on that involves a lot of repeated data.) As a specific example, consider sharing equivalen