[racket] arity of + versus <=

From: Carl Eastlund (cce at ccs.neu.edu)
Date: Fri Oct 28 14:36:56 EDT 2011

On Fri, Oct 28, 2011 at 2:28 PM, Joe Marshall <jmarshall at alum.mit.edu> wrote:
> On Fri, Oct 28, 2011 at 11:08 AM, Carl Eastlund <cce at ccs.neu.edu> wrote:
>> You seem to be assuming that we have to pick one binary->nary for all
>> binary operators.
> That is the nature of `generalization'.  If I have to discriminate, it isn't
> general.

Only if our job is to generalize binary operators as a class to n-ary
operators.  This thread is about generalizing <= (and a few related
operators) to n-ary operators.  We can do the latter without doing the

>>  I would choose this one for relations and the other
>> one for associative operators with identities.
> And you thus answer the original poster's question.
> `` is there a rationale beyond historical precedent
> for + and * to allow any number of arguments but, =, <=, <, >, >= to
> require at least two arguments?''
> Yes.  The two generalizations are different.

How is that a rationale?  I don't see why this kind of difference is
in any way an argument against generalization.  It may be a reason
that the designers thought of one kind of generalization but not the
other, but that's in the category of historical precedent.

> I made a clumsy argument to this effect by showing that the natural
> generalization
> for add and multiply do not extend to relational operators.


Posted on the users mailing list.