On Nov 3, 3:35 pm, Konrad Hinsen <[EMAIL PROTECTED]> wrote: > On 03.11.2008, at 17:22, Kelsin wrote: > > > First is the use of keywords as the predicate in some forms. For > > example in the turn function: (:ant @p) > > > Does :ant become a function of the map because it's a map? Can you > > always do this? Isn't this the same as (@p :ant)? > > Yes, yes, and yes.
Thought so, definitely neat, I like the readability a lot. > > Is there an equivalent for vectors? > > Not that I know of - and I can't think of anything obvious to use as > the accessor function. Vectors are simply indexed by numbers. Yeah that figures, didn't think that one through. I guess what I was really asking is if there was any other use of keyword functions, or just for maps. > I'll let more experienced users reply to your last question! Thanks for your help though! Chris G --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---
