Re: confusion about refs

2011-10-12 Thread Devin Walters
That is a very good explanation. On Wednesday, October 12, 2011 at 6:28 PM, Kevin Downey wrote: > refs, called as a function, try to call the value they hold as a > function with the given arguments > > ((first @my-contacts) :fname) ~= (:fname @(first @my-contacts)) > > basically you have tw

Re: confusion about refs

2011-10-12 Thread Kevin Downey
refs, called as a function, try to call the value they hold as a function with the given arguments ((first @my-contacts) :fname) ~= (:fname @(first @my-contacts)) basically you have two levels of refs, but are only derefing once, but by happy accident ((first @my-contacts) :fname) works On Wed,

confusion about refs

2011-10-12 Thread qhfgva
I was trying out an example from Practical Clojure and I don't understand why I get different results below? Can someone enlighten me? user=> @my-contacts [# # #] user=> (:fname (first @my-contacts)) nil user=> ((first @my-contacts) :fname) "Luke" Why would the placement of :fname change how it