I'm a newbie, so feel free to bash me on the noggin if i'm missing
something:
Personally, I would love = to support null-ary case; being able to
use apply with = seems very powerful, and would remove the need to
check for an empty sequence.
-Scott
On Dec 3, 9:39 pm, Krukow <[EMAIL PROTECTED]> wrote:
> On Dec 4, 5:40 am, "Stephen C. Gilardi" <[EMAIL PROTECTED]> wrote:
>
> > I agree. By the identity element argument, (/) should be 1 and (-)
> > should be 0.
>
> Regarding *the* identity argument, I think it only works if the
> operator is associative. Otherwise, you can talk about a left identity
> or a right identity (if it exists). A right identity for op is an x so
> that for all y: y op x = y. The left identity is an x so that for all
> y: x op y. Clojure seems to be using the 'right' identity argument ;-)
>
> Anyway, another interpretation of '=' would be logical/set-theoretic:
>
> (= o1 o2 ... on) means: for all x,y in {o1, ... ,on} . x = y.
>
> Then (not= o1 o2 ... on) could just be (not (= o1 o2 ... on)).
>
> Then (=) would be true and (not=) would be false.
>
> Kind Regards,
> - Karl
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---