[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 7 logical-xor implementations in source tree

From: Basil L. Contovounesios
Subject: Re: 7 logical-xor implementations in source tree
Date: Tue, 23 Jul 2019 14:20:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Andy Moreton <address@hidden> writes:

> On Tue 23 Jul 2019, Andreas Schwab wrote:
>> On Jul 23 2019, Andy Moreton <address@hidden> wrote:
>>> Perhaps an `xor' special form in eval.c next to `and' and `or' ?
>> There is no need for a special form since xor needs to evaluate all its
>> arguments anyway.
> You are right for a two argument xor. However for a multi-argument xor,
> the remaining arguments can be ignored after a second non-nil argument
> is evaluated.

No, xor must evaluate all of its arguments in all n-ary interpretations
suggested so far:

- Odd number of non-nil arguments
- Exactly one non-nil argument

Neither of these conditions can be known without examining the entire


reply via email to

[Prev in Thread] Current Thread [Next in Thread]