[Top][All Lists]

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

[Chicken-users] quasiquote, unquote-splicing and cons cells

From: Hans Bulfone
Subject: [Chicken-users] quasiquote, unquote-splicing and cons cells
Date: Sat, 5 Jan 2008 15:48:00 +0100
User-agent: Mutt/1.5.16 (2007-06-09)


in a macro i'm constructing a lambda-list in the following way:

`(,@rqd-args . ,rest-arg)

there are 3 cases:

1. (let ((rqd-args '(a b c)) (rest-arg 'r)) `(,@rqd-args . ,rest-arg))
   ==> (a b c . r)

2. (let ((rqd-args '(a b c)) (rest-arg '())) `(,@rqd-args . ,rest-arg))
   ==> (a b c)

so far so good, nothing special... but:

3. (let ((rqd-args '()) (rest-arg 'r)) `(,@rqd-args . ,rest-arg))
   ==> r

this is exactly how i hoped it to be, but the question is if this
is actually allowed or if it just works "accidentally".
r5rs doesn't seem to specify this case and '( . x) is not allowed.

i've tried the same expression with guile and sbcl and it worked
there as well but i'm still not sure if i should use it.

any opinions?


reply via email to

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