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

2008-01-06 Thread Andrew Hunter
On Sat, Jan 05, 2008 at 03:48:00PM +0100, Hans Bulfone wrote: 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. FWIW, SRFI-1 does specify this case, and

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

2008-01-06 Thread Hans Bulfone
hi, On Sat, Jan 05, 2008 at 03:10:51PM -0600, Zbigniew wrote: Hans, If I understand correctly, you're asking whether this is valid: `(,@'() . x) ;= x yes. i should have written my question more concisely :) According to Quasiquotation in Lisp (Alan Bawden), ... the most thanks for the

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

2008-01-05 Thread Hans Bulfone
hi, 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

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

2008-01-05 Thread John Cowan
Hans Bulfone scripsit: this is exactly how i hoped it to be, but the question is if this is actually allowed or if it just works accidentally. It is indeed valid to have a lambda-list that is just an identifier, in which case that identifier is bound to a list of all the arguments. See the

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

2008-01-05 Thread Zbigniew
Hans, If I understand correctly, you're asking whether this is valid: `(,@'() . x) ;= x According to Quasiquotation in Lisp (Alan Bawden), ... the most useful expansion of `(,@anything) is (append anything). So in order to give nested splicing a useful semantics, the code constructed by read