OK ... I am just catching up with the new features in Mathematica, Version 10.
In particular, the addition of Associate and operations that go with this concept
looks very interesting.
I decided to write a simple repetitive operation using the command "AssociateTo".
The purpose of my function called "extend" is to add an extra rule to the association,
every time that Nest goes through its iterations. However, Mathematica does not
seem to like the fact that I am performing a functional operation on an Association,
rather than a variable with a value. Can anyone tell me how to make this work?
'extend" takes an Association, and adds an extra rule to it.
to do this, I just generate a random number and put it in the form x -> number
However, the code below generates a bunch of errors.
Clear[extend];
extend [b_] := Module[ {}, AssociateTo[b, x -> RandomInteger[{1, 10}] ] ];
a1 = <||>;
Nest[extend, a1, 3]