emacs-devel
[Top][All Lists]
Advanced

[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 10:08:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Andy Moreton <address@hidden> writes:

> On Mon 22 Jul 2019, Oleh Krehel wrote:
>
>> I found myself in need of a logical-xor function. There's `xor' defined in
>> array.el. But I don't want my package to depend on array.el. So I grepped the
>> git source of some other definition of `xor'. And I found 7 results: 7
>> functions
>> doing the same thing, none of them in a satisfactory place.
>
> Is `logxor' what you are looking for ?

No, logxor is a bitwise operation on integers, whereas the proposed xor
operates on booleans, returning non-nil only if one of its arguments is
nil and the other is non-nil.

-- 
Basil



reply via email to

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