The thing I like about your record/protocol example version is that all the protocol function implementations can "see" the components of the record and use those names in the implementation without explicit destructuring. That adds significantly to the ease of working with multiple functions sharing common information.
I generally haven't been able to do this kind of thing because: 1. The implementations of the functions are too long to implement inline in the record definition. 2. Protocols are significantly more restricted than regular functions (e.g., aren't they restricted to 4 parameters, no indefinite arities, and no destructuring in the arguments?) On Fri, Dec 27, 2013 at 10:19 AM, john walker <john.lou.wal...@gmail.com>wrote: > I posted this in response to the original gist, but it probably wasn't > seen. Does this demonstrate the behavior you want? > > https://gist.github.com/johnwalker/8142143 > -- -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.