Hi! I wanna understand how to write macro in TinyScheme, but I don’t see any official docs how to do it… I’m kind of confused because this page doesn’t reflect the real macro syntax working in Gimp: macro
word is required AFAIU to define macro instead of let-syntax
.
For this reason I’ve tried to use this article hoping for the best. I’ve translated:
(defmacro setq2 (v1 v2 e)
(list 'progn (list 'setq v1 e) (list 'setq v2 e)))
as:
(macro (setq2 v1 v2 e)
(list 'begin (list 'setq v1 e) (list 'setq v2 e)))
But when I’ve called it:
(define a 1)
(define b 2)
(setq2 a b 3)
I got: Error: not enough arguments
. What am I doing wrong? Is it me or it’s a broken macro support in TinyScheme?