Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I create a list of bindings made to a certain variable when evaluating an expression? I want to determine three bindings made.

share|improve this question
Trace[expr,i=_] – Dr. belisarius Apr 21 '14 at 22:52
Make a class that represents the variable (as say with Java's Integer class), with private array that keeps track of all assignments/time stamp/counters, etc.. all hidden inside the class, Supply a set[] and get[] methods to the clients of your variable to use on the variable once it is instantiated. Making such Class in M is very easy. Make a Module, and inside the Module create the local variables and private methods. see… for one example. – Nasser Apr 22 '14 at 1:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.