From: Asuka
Subject: Problem with a defmacro declaration
Date: 
Message-ID: <cvgnrs$q7e$1@nsnmpen2-gest.nuria.telefonica-data.net>
Hi, I want to define a macro that can afford infinite arguments in in its 
declaration in the way

(myMacro 1 2 3 4)

(myMacro 1 2 3 4 5)

I mean, in one macro declaration, i want to be able to work with n 
arguments.

Can anybody help me?

Thanx 

From: Robert Marlow
Subject: Re: Problem with a defmacro declaration
Date: 
Message-ID: <pan.2005.02.23.02.45.08.96261@bobturf.org>
use &rest

(defmacro my-macro (&rest args) do-stuff)

all arguments will then be packed up into a list named args.


On Wed, 23 Feb 2005 02:56:10 +0100, Asuka wrote:

> Hi, I want to define a macro that can afford infinite arguments in in its 
> declaration in the way
> 
> (myMacro 1 2 3 4)
> 
> (myMacro 1 2 3 4 5)
> 
> I mean, in one macro declaration, i want to be able to work with n 
> arguments.
> 
> Can anybody help me?
> 
> Thanx
From: chandan
Subject: Re: Problem with a defmacro declaration
Date: 
Message-ID: <1109225336.863916.313870@o13g2000cwo.googlegroups.com>
use &rest

(defmacro my-macro (&rest args) do-stuff)

all arguments will then be packed up into a list named args.

OR similarily you can
 use (defmacro my-macro (a &rest args)

;;;"a" is first argument while rest of argument
;;;will be packed inside "args".  you can use
;;;those elements from "args" using "first:. 

<body>)