Given something like this: (defrecord F [a])
This fails: (clojure.walk/postwalk identity [(F. 1)]) because although (coll? (F. 1)) is true, (empty (F. 1)) fails ("can't create empty"). I've had to write an alternative to walk anyway (it discards metadata), and I'd like it to be able to accommodate this case more elegantly than calling empty and catching the exception if the object happens to be a record. (I suppose the best way would be to define walk in terms of something like fmap, so that individual records could decide whether they can be recursed into or not, but that might be overkill.) So: Q1: is this a bug in walk? Q2: is there a way to tell if something is an instance of a class created with defrecord? -- Ben Wolfson "Human kind has used its intelligence to vary the flavour of drinks, which may be sweet, aromatic, fermented or spirit-based. ... Family and social life also offer numerous other occasions to consume drinks for pleasure." [Larousse, "Drink" entry] -- 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