From: Bryant Brandon
Subject: I'm confused
Date: 
Message-ID: <26556CCEE8F643A6.3544F2AC36A22FE2.9597F8262D609465@library-proxy.airnews.net>
   I need to create a function that starts off with several keyword
arguments followed by a body.  This is just fine with a destructuring
bind, but the function chokes.
   What am I doing wrong and how do I work around this?

? (destructuring-bind ((&key a) &rest b) '((:a b) a)
    (list a b))
(B (A))
? ((lambda ((&key a) &rest b) (list a b)) '((:a b) b))
> Error: While compiling an anonymous function :
>        Bad lambda list : ((&KEY A) &REST B)
> Type Command-. to abort.
See the Restarts� menu item for further choices.
1 >

-- 
B.B.       --I am not a goat!
From: Barry Margolin
Subject: Re: I'm confused
Date: 
Message-ID: <I6Tg1.16$V%5.590065@cam-news-reader1.bbnplanet.com>
In article <··················································@library-proxy.airnews.net>,
Bryant Brandon <········@airmail.net> wrote:
>   I need to create a function that starts off with several keyword
>arguments followed by a body.  This is just fine with a destructuring
>bind, but the function chokes.

Function parameter lists don't allow nested lambda lists.  They're only
allowed in macros and DESTRUCTURING-BIND.

So you should define your function to take a single argument, and then use
DESTRUCTURING-BIND.

-- 
Barry Margolin, ······@bbnplanet.com
GTE Internetworking, Powered by BBN, Cambridge, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.