Re: automatic deref

2009-01-06 Thread Christophe Grand
Mark Volkmann a écrit : > Why does this output 1? > > (def my-ref (ref {:a 1})) > (my-ref :a) > > I thought I could only access data in a ref by dereferencing it, but > this shows otherwise. > > Refs (like Vars) implement IFn by delegating to their value but Rich stated to not rely on this beh

Re: automatic deref

2009-01-06 Thread wubbie
both (my-ref :a) and (@my-ref :a) returns 1. hmmm... On Jan 6, 11:01 am, "Mark Volkmann" wrote: > Why does this output 1? > > (def my-ref (ref {:a 1})) > (my-ref :a) > > I thought I could only access data in a ref by dereferencing it, but > this shows otherwise. > > -- > R. Mark Volkmann > Obje

automatic deref

2009-01-06 Thread Mark Volkmann
Why does this output 1? (def my-ref (ref {:a 1})) (my-ref :a) I thought I could only access data in a ref by dereferencing it, but this shows otherwise. -- R. Mark Volkmann Object Computing, Inc. --~--~-~--~~~---~--~~ You received this message because you are s