[racket] arity of + versus <=

From: Joe Marshall (jmarshall at alum.mit.edu)
Date: Fri Oct 28 14:28:32 EDT 2011

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

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

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


Posted on the users mailing list.