alien_guy <l@l.org> wrote:
+---------------
| fairchild.anthony@gmail.com wrote:
| > Is there any way to write the definition of TEST so that KEY-PAIRS does
| > not contain the keys X, Y and Z? Without explicitly removing them in
| > the function body of course ;-)
|
| No.
+---------------
The same answer, a little less tersely: ;-}
http://alu.org/HyperSpec/Body/sec_3-4-1-4.html
3.4.1.4 Specifiers for keyword parameters
...
When keyword parameters are processed, the same arguments are
processed that would be made into a list for a rest parameter.
It is permitted to specify both &REST and &KEY. In this case the
remaining arguments are used for both purposes; that is, all
remaining arguments are made into a list for the rest parameter,
and are also processed for the &KEY parameters.
Also note that <http://alu.org/HyperSpec/Body/sec_3-4-1.html>
"3.4.1 Ordinary Lambda Lists" requires that &REST come immediately
*before* &KEY [if both are present], so you can't get around it by
trying to manipulate the order or content of "the remaining arguments".
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607