I have been writing Common Lisp macros, so Scheme's R5Rs macros are a bit unnatural to me. I think I got the idea, except that I don't understand how one would use vector patterns in syntax-rules:
(define-syntax mac
(syntax-rules ()
((mac #(a b c d))
(let ()
(display a)
(newline)
(display d)
(newline)))))
(expand '(mac #(1 2 3 4))) ;; Chicken's expand-full extension shows macroexpansion
=> (let746 () (display747 1) (newline748) (display747 4) (newline748))
I don't see how I'd use a macro that requires its arguments to be written as a vector:
(mac #(1 2 3 4))
=>
1
4
Is there some kind of technique that uses those patterns?
Thank you!