Yes, that's intentional – implementing IFn is (as you can see) orthogonal to implementing IPersistentMap, IPersistentCollection, etc.
Of course, keyword access of record slots is most idiomatic, e.g. (:my-slot some-record) If you'd like to pass around a function that accesses a record, there's always get, e.g. ((partial get some-record) :my-slot) - Chas On Dec 30, 2010, at 8:08 AM, Sunil S Nandihalli wrote: > Hello everybody, > An object of class created using defrecord does not implement IFn .. while > it behaves very similar to map otherwise .. Is this way by design? can it be > made to behave like a hash-map without any performance penalty in terms of > behaving like a function? > > Thanks, > Sunil. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en