chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] syntax-case and #!rest, second attempt


From: mark
Subject: [Chicken-users] syntax-case and #!rest, second attempt
Date: Sun, 26 Aug 2007 02:18:06 +0200 (CEST)
User-agent: SquirrelMail/1.4.10a

Folks,

Since I'm still having problems with syntax-case and rest arguments, I
have devised the following example which hopefully makes my problem clear:

(define-syntax test
  (lambda (x)
    (syntax-case x ()
      ((_ (name ...) body ...)
       (syntax
        (define (name ...)
          body ...))))))

(test (test-fn #!rest rest)
      (fmt #t rest nl))

(test-fn)

This fails and will throw a bad argument count exception, because it
interprets #!rest as a variable and not a rest arguments keyword. This is
a very annoying problem. Does anyone know a solution to this? Would it
involve making changes to the syntax-case egg?

Thanks,
Mark






reply via email to

[Prev in Thread] Current Thread [Next in Thread]