This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Calling define within define-syntax


Chris Dean wrote:

Didn't this used to work?

    (define-syntax define*
      (syntax-rules ()
        ((define* (name arg ...) body ...)
         (define (name arg ... )
           (format #t "--- start ~S~%" name)
           (let ((res (begin body ...)))
             (format #t "--- end ~S~%" name)
             res)))))

    (define* (fact n)
      (if (< n 2)
          1
          (* n (fact (- n 1)))))

Hm. It doesn't work for me either, and I don't offhand knwo why. I'll take a look. (Note I'll be travelling/vacationing for a week, but I do expect to spend some time hacking on Kawa while I'm gone. I should have email access most of the time.)

(I assume you know about the trace/untrace forms?)
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]