Re: atom with metadata

2012-09-10 Thread Herwig Hochleitner
While you have found the solution, note that there are 3 places for metadata in an expression like: (def a (atom [])) - The value inside the atom can have metadata: (meta @a) This will change with a swap! - The atom itself can have metadata: (meta a) This will survive a swap! - The var hold

Re: atom with metadata

2012-09-09 Thread John Holland
sorry, figured it out after I posted - to get at the meta have to deref the atom On Sunday, September 9, 2012 10:50:34 AM UTC-4, John Holland wrote: > > Can I perform a swap! on an atom and have the metadata survive? Or else > reapply it somehow? The only way I seem to be able to apply metadata