On 25/10/12 16:59, Brian Craft wrote:
I have a fairly common scenario where I have a set of operations that need to work on two types of data (not "data types" in the clojure sense) that have different internal structure (i.e. maps with different keys). I could write a generic function that operates on both types of map.

I'm not sure I follow why you need polymorphic behavior of any form...the operations that need to operate on 2 internally different maps can take the keys to 'touch' as parameters couldn't they? Then it is truly generic...if this is not practical you can always make a HOF that returns the appropriate handler for the data-type you're examining at any given time...meta-data could help you distinguish between the maps...

am I missing something?

Jim

--
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

Reply via email to