| In CL, you can list multiple cases for a 'case branch by enclosing them in a list: >(case 5
((1 3 5) 'odd)
((2 4 6) 'even)
(t '?))
ODD
Unfortunately, this doesn't work in Arc. arc>(def f (x)
(case x
(1 3 5) 'odd
(2 4 6) 'even
'?)))
#<procedure: f>
arc>(f 5)
?
arc>(f '(1 3 5))
odd
A minor change in caselet fixes this, but before I push that to anarki, I want to make sure no one expects/depends on the current behavior. (mac caselet (var expr . args)
...
- `(if (is ,var ',(car args))
+ `(if (in ,var ,@(map [list 'quote _]
+ (mklist (car args))))
...)
|