can anybody tell me why code like this emits style warning?
(let ((x (random 3)))
(format t "x = ~a~%" x)
((or 0 1) :small)
((or 2 3) :big)))
; in: LAMBDA NIL
; ((OR 2 3) :BIG)
; caught STYLE-WARNING:
; (in macroexpansion of (ECASE X # ...))
; (hint: For more precise location, try *BREAK-ON-SIGNALS*.)
; Duplicate key OR in ECASE form, occurring in the first clause:
; ((OR 0 1) :SMALL), and the second clause:
; ((OR 2 3) :BIG).
; compilation unit finished
; caught 1 STYLE-WARNING condition
x = 2
I use variant of this code (with symbols). I know that the warning is
because repeated (or val val ..), but from the coding style point of
view, I can't see anything wrong with it. Does anybody have some
explanation why is this not recommended?