chickadee » anaphora » acond

(acond ((test xpr ...) ... (else ypr ...) ..))syntax

Anaphoric version of cond.

The result of each test is stored in the variable it, which can be used in the corresponding expressions xpr ...

(acond
	((memv 6 '(1 2 3 4 5)) it)
	((memv 3 '(1 2 3 4 5)) it)
	(else it))

Note, that the ordinary cond macro does something similar with the literal symbol =>.