ianhinder / Kranc

A Mathematica package for generating code for solving time dependent partial differential equations
http://kranccode.org
GNU General Public License v2.0
29 stars 10 forks source link

Provide a mapRefAppend operation. #120

Open dmkoppelman opened 9 years ago

dmkoppelman commented 9 years ago

Kranc Issue 113 provided reference-like functionality to the MapLookup functions. In this issue add to this functionality an append function, mapRefAppend. Evaluating mapRefAppend[map,key,morevalue] will append morevalue to the current value of the reference corresponding to key in map. Note that key maps to a reference, and it's the target of the reference that's updated, so that the change is visible to all holders of the reference.