(define impc:ti:genericfunc-apply-macros
(lambda (ast)
(cond ((atom? ast) ast)
((and (list? ast)
(symbol? (car ast))
(impc:ti:xtmacro-exists? (symbol->string (car ast))))
(macro-expand (cons (string->symbol
(string-append "xtmacro_"
(symbol->string (car ast))))
(cdr ast))))
((pair? ast)
(cons (impc:ti:genericfunc-apply-macros (car ast))
(impc:ti:genericfunc-apply-macros (cdr ast))))
(else ast))))