pretty-printing?
Per Bothner
per@bothner.com
Mon Oct 1 00:37:00 GMT 2007
David St-Hilaire wrote:
> I'm completely new to kawa and I have a few questions.
Welcome!
> I wrote a simple macro which is:
>
> (define-macro (pp arg)
> `(begin (display ,arg) (newline)))
This is a FAQ (though alas Kawa doesn't have an FAQ list).
Answer: Don't use define-macro or defmacro.
Instead use define-syntax:
(define-syntax pp
(syntax-rules ()
((pp arg) (begin (display arg) (newline)))))
--
--Per Bothner
per@bothner.com http://per.bothner.com/
More information about the Kawa
mailing list