On Dec 6, 8:50 pm, John Ky <newho...@gmail.com> wrote:
> Hi,
>
> Is it possible to define the functions >, <, >=, <=, ==, min, and max for my
> own defstruct type?
>
> My type is:
>
> (defstruct deadline :value)
>
> where I initialise value with an object of type long.
>
> Thanks
>
> -John

The functions >, <, >=, <= are only for numbers (though there might be
a way to shadow them).  You can use the compare function for anything
implementing the Comparable interface (which should be easier to do
when using deftype instead of defstruct).

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