[mercury-users] lisp macros
Michael Day
mikeday at bigpond.net.au
Fri May 24 15:11:00 AEST 2002
> Here's a little example from some XML processing I did in Scheme using
> unhygienic macros:
>
> (defmacro x-define (Id . Body)
> `(define (,Id Element Ancestors) ,(list 'quasiquote Body)))
> (defmacro apply-templates ()
> `(process-children Element Ancestors))
Any tips on how this kind of thing would look in Mercury for people who
don't know lisp? :)
Michael
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list