About two weeks ago, Daniel Prager wrote: > > Does… CL have a pattern-based macro syntax like syntax-rules? > > Not buit-in.
It does have a way of doing something similar to patterns, though less sophisticated -- the argument list of a macro is actually used with `destructuring-bind', so you can do things like CL-USER(1): (defmacro bind ((var val) &body body) `(let ((,var ,val)) ,@body)) BIND CL-USER(2): (bind (x 1) (+ x 2)) 3 It's missing keyword matching, the magical `...', and, of course, it's not limited to just rewrite rules. But that's as irrelevant as pattern matching is to `syntax-case' discussions. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! ____________________ Racket Users list: http://lists.racket-lang.org/users