I'm attempting to learn Clojure with a long history of OO and have some
questions.    I've created a defstruct for a place type object like:

(defstruct place :id :name :street :city :state :zip)

I want to write a function that would take a list of places and remove
the duplicates.   Duplicates are defined by places having the same :id.
I created a 'place' namespace and attempted to create a function
called '=' that would only use the :id to compare two places, however,
I was not about to create such a function name.   Is there a preferred
function name for equality in this case?

Coming from an OO background and wanting a geocoded-place
struc is there a way to "inherit" from the place struct?   Something
like take all of the existing keys from the place struct and also add
:latitude & :longitude?

Thanks.

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

Reply via email to