Package: alexandria

Macro xor

Lambda List

xor (&rest datums)

Details

The logical operation exclusive or.

Evaluates its arguments one at a time, from left to right. If more then one argument evaluates to a true value no further datums are evaluated, and nil is returned as both primary and secondary value. If exactly one argument evaluates to true, its value is returned as the primary value after all the arguments have been evaluated, and t is returned as the secondary value. If no arguments evaluate to true nil is returned as primary, and t as secondary value.