Robin Lee Powell wrote:
Anybody got a good define-macro tutorial?
This is not bad:
http://www.gigamonkeys.com/book/macros-defining-your-own.html#defmacro
It's CL, not Scheme, but I believe define-macro comes from CL anyways.
You can ignore the part before the anchor that link goes to.
If you have never seen CL, you can either read the previous chapters
of that book, or pretend it's just Scheme with a different syntax:
(defun name (args ...) body ...)
=> (define (name args ...) body ...)
(defmacro name (args ...) body ...)
=> (define-macro (name args ...) body ...)
IIRC (do) is the same as in Scheme. If you encounter (loop) just
treat it intuitively (and watch your back ;-) This should be enough
to get through that chapter.
Tobia
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users