(mac foreach (var . args) (if (is car.args 'in) `(each ,var ,(cadr args) ,@(cddr args)) (is car.args 'fruitloops) `(each ,var ,(cadr args) (prn "yum")) (acons car.args) `(each ,var ,(car args) ,@(cdr args))))
(mac foreach (var . args) `(each ,var ,(if (in car.args 'in 'fruitloops) cadr.args car.args) ,@(case car.args 'in cddr.args 'fruitloops `((prn "yum")) cdr.args)))
Upperdate: Aha! It's because in and fruitloops in the case statement should not be quoted:
(mac foreach (var . args) `(each ,var ,(if (in car.args 'in 'fruitloops) cadr.args car.args) ,@(case car.args in cddr.args ; in not quoted fruitloops `((prn "yum")) ; ditto fruitloops cdr.args)))