From: Slobodan Blazeski
Subject: Is it possible to see how many arguments  a function take?
Date: 
Message-ID: <5c988e04-b0fc-493e-aaab-902259aae3e2@s37g2000prg.googlegroups.com>
I know  that I'm looking too much from reflection but is there a way
to  *see* at runtime how many argument a function takes? How about
number of values returned ?
Or some good tips about lisp reflections.

thanks
Slobodan
http://tourdelisp.blogspot.com/

From: ···············@gmail.com
Subject: Re: Is it possible to see how many arguments a function take?
Date: 
Message-ID: <e895b0b1-9cbf-469f-87a3-630ab3ce38d4@c19g2000prf.googlegroups.com>
On Mar 22, 2:52 pm, Slobodan Blazeski <·················@gmail.com>
wrote:
> I know  that I'm looking too much from reflection but is there a way
> to  *see* at runtime how many argument a function takes? How about
> number of values returned ?
> Or some good tips about lisp reflections.
>
> thanks
> Slobodanhttp://tourdelisp.blogspot.com/

There may be better ways but I use:

  #+:clisp (sys::arglist fn)
  #+:sbcl (sb-introspect:function-arglist fn)

But you'll need to normalise across implementations and probably parse
the lambda-list returned for things like &optional, etc.

--
Phil
http://phil.nullable.eu/
From: Brian
Subject: Re: Is it possible to see how many arguments a function take?
Date: 
Message-ID: <fef254c9-64db-474a-bd37-63ec78ede49b@n75g2000hsh.googlegroups.com>
To get the number of values returned from form you could do (length
(multiple-value-list <form>)), but I don't know how without evaluating
the form.
From: D Herring
Subject: Re: Is it possible to see how many arguments a function take?
Date: 
Message-ID: <-YadnW2VwO65oHjanZ2dnUVZ_oOnnZ2d@comcast.com>
Brian wrote:
> To get the number of values returned from form you could do (length
> (multiple-value-list <form>)), but I don't know how without evaluating
> the form.

Nor does Lisp itself; people are free to redefine functions, and 
functions can return different lists depending on the arguments, time 
of day, or anything else...

AFAIK, there isn't a standard way of declaring that "FOO always 
returns 3 arguments, of the form '(string fixnum function)".

- Daniel
From: Marco Antoniotti
Subject: Re: Is it possible to see how many arguments a function take?
Date: 
Message-ID: <39d4bb46-fbb0-40fb-aeef-1b825740ba09@b1g2000hsg.googlegroups.com>
On Mar 22, 4:52 pm, Slobodan Blazeski <·················@gmail.com>
wrote:
> I know  that I'm looking too much from reflection but is there a way
> to  *see* at runtime how many argument a function takes? How about
> number of values returned ?
> Or some good tips about lisp reflections.
>
> thanks
> Slobodanhttp://tourdelisp.blogspot.com/

There is no portable way to do the first (although most CLs have an
"arglist" vel similia); you may hope that FUNCTION-LAMBDA-EXPRESSION
worked in your CL, but it is no given.  There is no portable way to do
the second one , although TYPE-OF *may* help in this case (and in the
first one as well); your CL may have something under the hood.

Cheers
--
Marco
From: Steven M. Haflich
Subject: Re: Is it possible to see how many arguments a function take?
Date: 
Message-ID: <MVhFj.19302$xq2.3540@newssvr21.news.prodigy.net>
Marco Antoniotti wrote:

> There is no portable way to do the first (although most CLs have an
> "arglist" vel similia)

It is, of course, portably possible to examine the argument list of a 
generic function and its component methods.

But strictly speaking, the original question does not have definite 
semantics.  Precisely what does it mean that a function "takes" some 
number of arguments.  How many arguments does this function accept?

(defun foo (x y)
   ;;This example assumes program-error is a simple-error, which
   ;;is not a portable assumption.
   (error 'program-error
	 :format-control "foo doesn't like these arguments: ~s ~s"
	 :format-arguments (list x y)))

What about this function?

(defun foo (x y)
   (when (oddp (get-universal-time))
     (error 'program-error
	   :format-control "foo doesn't like these arguments: ~s ~s"
	   :format-arguments (list x y))))

Calling this function with the wrong number of arguments is not portably 
distinguishable from calling it with the "right" number of arguments.
From: Marco Antoniotti
Subject: Re: Is it possible to see how many arguments a function take?
Date: 
Message-ID: <3633216d-7534-4d9c-96a0-8838f4ed72fc@b64g2000hsa.googlegroups.com>
On Mar 23, 2:57 am, "Steven M. Haflich" <····@alum.mit.edu> wrote:
> Marco Antoniotti wrote:
> > There is no portable way to do the first (although most CLs have an
> > "arglist" vel similia)
>
> It is, of course, portably possible to examine the argument list of a
> generic function and its component methods.

How?  AFAIR, you can if you resort to the MOP, but not if you restrict
yourself to ANSI.


>
> But strictly speaking, the original question does not have definite
> semantics.  Precisely what does it mean that a function "takes" some
> number of arguments.  How many arguments does this function accept?
>
> (defun foo (x y)
>    ;;This example assumes program-error is a simple-error, which
>    ;;is not a portable assumption.
>    (error 'program-error
>          :format-control "foo doesn't like these arguments: ~s ~s"
>          :format-arguments (list x y)))
>
> What about this function?
>
> (defun foo (x y)
>    (when (oddp (get-universal-time))
>      (error 'program-error
>            :format-control "foo doesn't like these arguments: ~s ~s"
>            :format-arguments (list x y))))
>
> Calling this function with the wrong number of arguments is not portably
> distinguishable from calling it with the "right" number of arguments.

Granted.  The semantics of the OP should be further specified.

Cheers
--
Marco
From: Slobodan Blazeski
Subject: Re: Is it possible to see how many arguments a function take?
Date: 
Message-ID: <9e1bd7cc-ace3-4fb9-92f7-9e7ec1660c67@a1g2000hsb.googlegroups.com>
On Mar 23, 2:12 pm, Marco Antoniotti <·······@gmail.com> wrote:
> On Mar 23, 2:57 am, "Steven M. Haflich" <····@alum.mit.edu> wrote:
>
> > Marco Antoniotti wrote:
> > > There is no portable way to do the first (although most CLs have an
> > > "arglist" vel similia)
>
> > It is, of course, portably possible to examine the argument list of a
> > generic function and its component methods.
>
> How?  AFAIR, you can if you resort to the MOP, but not if you restrict
> yourself to ANSI.
>
>
>
>
>
> > But strictly speaking, the original question does not have definite
> > semantics.  Precisely what does it mean that a function "takes" some
> > number of arguments.  How many arguments does this function accept?
>
> > (defun foo (x y)
> >    ;;This example assumes program-error is a simple-error, which
> >    ;;is not a portable assumption.
> >    (error 'program-error
> >          :format-control "foo doesn't like these arguments: ~s ~s"
> >          :format-arguments (list x y)))
>
> > What about this function?
>
> > (defun foo (x y)
> >    (when (oddp (get-universal-time))
> >      (error 'program-error
> >            :format-control "foo doesn't like these arguments: ~s ~s"
> >            :format-arguments (list x y))))
>
> > Calling this function with the wrong number of arguments is not portably
> > distinguishable from calling it with the "right" number of arguments.
>
> Granted.  The semantics of the OP should be further specified.
>
> Cheers
> --
> Marco

Thanks to everybody for their answers. I think this approach got me
into dead end, and I'll have to look elsewhere.
Basically I want a facility (probably it has to be macro though I
would prefer a function) that will inspect a function and behave
according to it. baically I want a function to be some kind of
controller, that will tell the facility how to bind,step, what to
return etc.
(map #'(lambda (x) (+ 4 x)) '( 1 2 3 4)) => (5 6 7 8)
(mapcar #'(lambda (x) (+ 4 x)) '( 1 2 3 4))

(map #'(lambda (x1 x2) (+  x1 x2)) '(1 2 3 4 5)) => (3 7)
(defun foo (list)
  (if (endp  (cddr list)) nil
      (cons (+ (car list) (cadr list)) (foo (cddr list))))

(map #'(*lambda* (x ($result 7)) (incf $result x)) '(1 2 3)) => 13
(+ 7 (reduce  #'+ '(1 2 3))
From: Marco Antoniotti
Subject: Re: Is it possible to see how many arguments a function take?
Date: 
Message-ID: <fcf86961-df6b-4d8e-a9fc-4ad3fbfed277@13g2000hsb.googlegroups.com>
On Mar 23, 4:01 pm, Slobodan Blazeski <·················@gmail.com>
wrote:
> On Mar 23, 2:12 pm, Marco Antoniotti <·······@gmail.com> wrote:
>
>
>
> > On Mar 23, 2:57 am, "Steven M. Haflich" <····@alum.mit.edu> wrote:
>
> > > Marco Antoniotti wrote:
> > > > There is no portable way to do the first (although most CLs have an
> > > > "arglist" vel similia)
>
> > > It is, of course, portably possible to examine the argument list of a
> > > generic function and its component methods.
>
> > How?  AFAIR, you can if you resort to the MOP, but not if you restrict
> > yourself to ANSI.
>
> > > But strictly speaking, the original question does not have definite
> > > semantics.  Precisely what does it mean that a function "takes" some
> > > number of arguments.  How many arguments does this function accept?
>
> > > (defun foo (x y)
> > >    ;;This example assumes program-error is a simple-error, which
> > >    ;;is not a portable assumption.
> > >    (error 'program-error
> > >          :format-control "foo doesn't like these arguments: ~s ~s"
> > >          :format-arguments (list x y)))
>
> > > What about this function?
>
> > > (defun foo (x y)
> > >    (when (oddp (get-universal-time))
> > >      (error 'program-error
> > >            :format-control "foo doesn't like these arguments: ~s ~s"
> > >            :format-arguments (list x y))))
>
> > > Calling this function with the wrong number of arguments is not portably
> > > distinguishable from calling it with the "right" number of arguments.
>
> > Granted.  The semantics of the OP should be further specified.
>
> > Cheers
> > --
> > Marco
>
> Thanks to everybody for their answers. I think this approach got me
> into dead end, and I'll have to look elsewhere.
> Basically I want a facility (probably it has to be macro though I
> would prefer a function) that will inspect a function and behave
> according to it. baically I want a function to be some kind of
> controller, that will tell the facility how to bind,step, what to
> return etc.

This is called an interpreter.  Otherwise the halting problem is
standing in front of you :)


> (map #'(lambda (x) (+ 4 x)) '( 1 2 3 4)) => (5 6 7 8)
> (mapcar #'(lambda (x) (+ 4 x)) '( 1 2 3 4))
>
> (map #'(lambda (x1 x2) (+  x1 x2)) '(1 2 3 4 5)) => (3 7)
> (defun foo (list)
>   (if (endp  (cddr list)) nil
>       (cons (+ (car list) (cadr list)) (foo (cddr list))))
>
> (map #'(*lambda* (x ($result 7)) (incf $result x)) '(1 2 3)) => 13
> (+ 7 (reduce  #'+ '(1 2 3))

This is unclear to me.  What exactly do you mean with the expressions
above (especially with the *lambda* thingy?

Cheers
--
Marco
From: Slobodan Blazeski
Subject: Re: Is it possible to see how many arguments a function take?
Date: 
Message-ID: <ab90cabf-197f-421a-9af7-61c4b5e14392@59g2000hsb.googlegroups.com>
On Mar 23, 5:21 pm, Marco Antoniotti <·······@gmail.com> wrote:
> On Mar 23, 4:01 pm, Slobodan Blazeski <·················@gmail.com>
> wrote:
>
>
>
>
>
> > On Mar 23, 2:12 pm, Marco Antoniotti <·······@gmail.com> wrote:
>
> > > On Mar 23, 2:57 am, "Steven M. Haflich" <····@alum.mit.edu> wrote:
>
> > > > Marco Antoniotti wrote:
> > > > > There is no portable way to do the first (although most CLs have an
> > > > > "arglist" vel similia)
>
> > > > It is, of course, portably possible to examine the argument list of a
> > > > generic function and its component methods.
>
> > > How?  AFAIR, you can if you resort to the MOP, but not if you restrict
> > > yourself to ANSI.
>
> > > > But strictly speaking, the original question does not have definite
> > > > semantics.  Precisely what does it mean that a function "takes" some
> > > > number of arguments.  How many arguments does this function accept?
>
> > > > (defun foo (x y)
> > > >    ;;This example assumes program-error is a simple-error, which
> > > >    ;;is not a portable assumption.
> > > >    (error 'program-error
> > > >          :format-control "foo doesn't like these arguments: ~s ~s"
> > > >          :format-arguments (list x y)))
>
> > > > What about this function?
>
> > > > (defun foo (x y)
> > > >    (when (oddp (get-universal-time))
> > > >      (error 'program-error
> > > >            :format-control "foo doesn't like these arguments: ~s ~s"
> > > >            :format-arguments (list x y))))
>
> > > > Calling this function with the wrong number of arguments is not portably
> > > > distinguishable from calling it with the "right" number of arguments.
>
> > > Granted.  The semantics of the OP should be further specified.
>
> > > Cheers
> > > --
> > > Marco
>
> > Thanks to everybody for their answers. I think this approach got me
> > into dead end, and I'll have to look elsewhere.
> > Basically I want a facility (probably it has to be macro though I
> > would prefer a function) that will inspect a function and behave
> > according to it. baically I want a function to be some kind of
> > controller, that will tell the facility how to bind,step, what to
> > return etc.
>
> This is called an interpreter.  Otherwise the halting problem is
> standing in front of you :)
>
> > (map #'(lambda (x) (+ 4 x)) '( 1 2 3 4)) => (5 6 7 8)
> > (mapcar #'(lambda (x) (+ 4 x)) '( 1 2 3 4))
>
> > (map #'(lambda (x1 x2) (+  x1 x2)) '(1 2 3 4 5)) => (3 7)
> > (defun foo (list)
> >   (if (endp  (cddr list)) nil
> >       (cons (+ (car list) (cadr list)) (foo (cddr list))))
>
> > (map #'(*lambda* (x ($result 7)) (incf $result x)) '(1 2 3)) => 13
> > (+ 7 (reduce  #'+ '(1 2 3))
>
> This is unclear to me.  What exactly do you mean with the expressions
> above (especially with the *lambda* thingy?


I want to create a graceful replacement for looping, with syntax like
this:
(map controler &rest generators)
Generators provide elements, they could be containers (list, hash-
tables, arrays, strings ..), atoms 1 'a #\a or even functions.
Controlers , control the initialisation,stepping, results etc. So
basically it'll render outdated control structures like: mapcar,
reduce, dolist, dotimes, do, loop.
Because you could loop through each container and as you wish using
just map and nothing more.

The only thing I have problem to figure out is how to gracefully
collect multiple results. I need an efficient equivalent to below.
(defun separate (lst)
   (mapcar #'(lambda (n) (mapcar #'abs (remove-if-not n lst)))
     (list #'plusp #'zerop #'minusp)))
Something graceful like it but that will travel the list only once.
Sorry for my confusing explanation but the ideas are still shaping in
my mind and it usually helps when I try to explain this to somebody.
Basically I want to use the ideas of array processing I found in APL
family of languages, j & q and implement them as library in lispified
form.
If you need inspiration to understand look at www.nsl.com especially
the challenge http://www.nsl.com/papers/kisntlisp.htm

This my blog post with even more confusing explanation
http://tourdelisp.blogspot.com/2008/03/all-those-parenthesis-are-counting-on.html

cheers
slobodan
From: Marco Antoniotti
Subject: Re: Is it possible to see how many arguments a function take?
Date: 
Message-ID: <2f7d68c2-e986-42b4-bb7d-5a362e806e0d@n77g2000hse.googlegroups.com>
On Mar 24, 11:23 am, Slobodan Blazeski <·················@gmail.com>
wrote:
> On Mar 23, 5:21 pm, Marco Antoniotti <·······@gmail.com> wrote:
>
>
>
> > On Mar 23, 4:01 pm, Slobodan Blazeski <·················@gmail.com>
> > wrote:
>
> > > On Mar 23, 2:12 pm, Marco Antoniotti <·······@gmail.com> wrote:
>
> > > > On Mar 23, 2:57 am, "Steven M. Haflich" <····@alum.mit.edu> wrote:
>
> > > > > Marco Antoniotti wrote:
> > > > > > There is no portable way to do the first (although most CLs have an
> > > > > > "arglist" vel similia)
>
> > > > > It is, of course, portably possible to examine the argument list of a
> > > > > generic function and its component methods.
>
> > > > How?  AFAIR, you can if you resort to the MOP, but not if you restrict
> > > > yourself to ANSI.
>
> > > > > But strictly speaking, the original question does not have definite
> > > > > semantics.  Precisely what does it mean that a function "takes" some
> > > > > number of arguments.  How many arguments does this function accept?
>
> > > > > (defun foo (x y)
> > > > >    ;;This example assumes program-error is a simple-error, which
> > > > >    ;;is not a portable assumption.
> > > > >    (error 'program-error
> > > > >          :format-control "foo doesn't like these arguments: ~s ~s"
> > > > >          :format-arguments (list x y)))
>
> > > > > What about this function?
>
> > > > > (defun foo (x y)
> > > > >    (when (oddp (get-universal-time))
> > > > >      (error 'program-error
> > > > >            :format-control "foo doesn't like these arguments: ~s ~s"
> > > > >            :format-arguments (list x y))))
>
> > > > > Calling this function with the wrong number of arguments is not portably
> > > > > distinguishable from calling it with the "right" number of arguments.
>
> > > > Granted.  The semantics of the OP should be further specified.
>
> > > > Cheers
> > > > --
> > > > Marco
>
> > > Thanks to everybody for their answers. I think this approach got me
> > > into dead end, and I'll have to look elsewhere.
> > > Basically I want a facility (probably it has to be macro though I
> > > would prefer a function) that will inspect a function and behave
> > > according to it. baically I want a function to be some kind of
> > > controller, that will tell the facility how to bind,step, what to
> > > return etc.
>
> > This is called an interpreter.  Otherwise the halting problem is
> > standing in front of you :)
>
> > > (map #'(lambda (x) (+ 4 x)) '( 1 2 3 4)) => (5 6 7 8)
> > > (mapcar #'(lambda (x) (+ 4 x)) '( 1 2 3 4))
>
> > > (map #'(lambda (x1 x2) (+  x1 x2)) '(1 2 3 4 5)) => (3 7)
> > > (defun foo (list)
> > >   (if (endp  (cddr list)) nil
> > >       (cons (+ (car list) (cadr list)) (foo (cddr list))))
>
> > > (map #'(*lambda* (x ($result 7)) (incf $result x)) '(1 2 3)) => 13
> > > (+ 7 (reduce  #'+ '(1 2 3))
>
> > This is unclear to me.  What exactly do you mean with the expressions
> > above (especially with the *lambda* thingy?
>
> I want to create a graceful replacement for looping, with syntax like
> this:
> (map controler &rest generators)
> Generators provide elements, they could be containers (list, hash-
> tables, arrays, strings ..), atoms 1 'a #\a or even functions.

Or even enumerations (shameless plug: http://common-lisp.net/project/cl-enumeration/)

> Controlers , control the initialisation,stepping, results etc. So
> basically it'll render outdated control structures like: mapcar,
> reduce, dolist, dotimes, do, loop.
> Because you could loop through each container and as you wish using
> just map and nothing more.
>
> The only thing I have problem to figure out is how to gracefully
> collect multiple results. I need an efficient equivalent to below.
> (defun separate (lst)
>    (mapcar #'(lambda (n) (mapcar #'abs (remove-if-not n lst)))
>      (list #'plusp #'zerop #'minusp)))
> Something graceful like it but that will travel the list only once.
> Sorry for my confusing explanation but the ideas are still shaping in
> my mind and it usually helps when I try to explain this to somebody.
> Basically I want to use the ideas of array processing I found in APL
> family of languages, j & q and implement them as library in lispified
> form.
> If you need inspiration to understand look atwww.nsl.comespecially
> the challengehttp://www.nsl.com/papers/kisntlisp.htm
>
> This my blog post with even more confusing explanationhttp://tourdelisp.blogspot.com/2008/03/all-those-parenthesis-are-coun...
>

As I noted on your blog, you should have a look at SERIES.

Cheers
--
Marco
From: Slobodan Blazeski
Subject: Re: Is it possible to see how many arguments a function take?
Date: 
Message-ID: <84a2d057-18fb-46a6-9db8-3a744849daae@a70g2000hsh.googlegroups.com>
On Mar 24, 2:51 am, Marco Antoniotti <·······@gmail.com> wrote:
> On Mar 24, 11:23 am, Slobodan Blazeski <·················@gmail.com>
> wrote:
>
>
>
>
>
> > On Mar 23, 5:21 pm, Marco Antoniotti <·······@gmail.com> wrote:
>
> > > On Mar 23, 4:01 pm, Slobodan Blazeski <·················@gmail.com>
> > > wrote:
>
> > > > On Mar 23, 2:12 pm, Marco Antoniotti <·······@gmail.com> wrote:
>
> > > > > On Mar 23, 2:57 am, "Steven M. Haflich" <····@alum.mit.edu> wrote:
>
> > > > > > Marco Antoniotti wrote:
> > > > > > > There is no portable way to do the first (although most CLs have an
> > > > > > > "arglist" vel similia)
>
> > > > > > It is, of course, portably possible to examine the argument list of a
> > > > > > generic function and its component methods.
>
> > > > > How?  AFAIR, you can if you resort to the MOP, but not if you restrict
> > > > > yourself to ANSI.
>
> > > > > > But strictly speaking, the original question does not have definite
> > > > > > semantics.  Precisely what does it mean that a function "takes" some
> > > > > > number of arguments.  How many arguments does this function accept?
>
> > > > > > (defun foo (x y)
> > > > > >    ;;This example assumes program-error is a simple-error, which
> > > > > >    ;;is not a portable assumption.
> > > > > >    (error 'program-error
> > > > > >          :format-control "foo doesn't like these arguments: ~s ~s"
> > > > > >          :format-arguments (list x y)))
>
> > > > > > What about this function?
>
> > > > > > (defun foo (x y)
> > > > > >    (when (oddp (get-universal-time))
> > > > > >      (error 'program-error
> > > > > >            :format-control "foo doesn't like these arguments: ~s ~s"
> > > > > >            :format-arguments (list x y))))
>
> > > > > > Calling this function with the wrong number of arguments is not portably
> > > > > > distinguishable from calling it with the "right" number of arguments.
>
> > > > > Granted.  The semantics of the OP should be further specified.
>
> > > > > Cheers
> > > > > --
> > > > > Marco
>
> > > > Thanks to everybody for their answers. I think this approach got me
> > > > into dead end, and I'll have to look elsewhere.
> > > > Basically I want a facility (probably it has to be macro though I
> > > > would prefer a function) that will inspect a function and behave
> > > > according to it. baically I want a function to be some kind of
> > > > controller, that will tell the facility how to bind,step, what to
> > > > return etc.
>
> > > This is called an interpreter.  Otherwise the halting problem is
> > > standing in front of you :)
>
> > > > (map #'(lambda (x) (+ 4 x)) '( 1 2 3 4)) => (5 6 7 8)
> > > > (mapcar #'(lambda (x) (+ 4 x)) '( 1 2 3 4))
>
> > > > (map #'(lambda (x1 x2) (+  x1 x2)) '(1 2 3 4 5)) => (3 7)
> > > > (defun foo (list)
> > > >   (if (endp  (cddr list)) nil
> > > >       (cons (+ (car list) (cadr list)) (foo (cddr list))))
>
> > > > (map #'(*lambda* (x ($result 7)) (incf $result x)) '(1 2 3)) => 13
> > > > (+ 7 (reduce  #'+ '(1 2 3))
>
> > > This is unclear to me.  What exactly do you mean with the expressions
> > > above (especially with the *lambda* thingy?
>
> > I want to create a graceful replacement for looping, with syntax like
> > this:
> > (map controler &rest generators)
> > Generators provide elements, they could be containers (list, hash-
> > tables, arrays, strings ..), atoms 1 'a #\a or even functions.
>
> Or even enumerations (shameless plug:http://common-lisp.net/project/cl-enumeration/)
>
>
>
>
>
> > Controlers , control the initialisation,stepping, results etc. So
> > basically it'll render outdated control structures like: mapcar,
> > reduce, dolist, dotimes, do, loop.
> > Because you could loop through each container and as you wish using
> > just map and nothing more.
>
> > The only thing I have problem to figure out is how to gracefully
> > collect multiple results. I need an efficient equivalent to below.
> > (defun separate (lst)
> >    (mapcar #'(lambda (n) (mapcar #'abs (remove-if-not n lst)))
> >      (list #'plusp #'zerop #'minusp)))
> > Something graceful like it but that will travel the list only once.
> > Sorry for my confusing explanation but the ideas are still shaping in
> > my mind and it usually helps when I try to explain this to somebody.
> > Basically I want to use the ideas of array processing I found in APL
> > family of languages, j & q and implement them as library in lispified
> > form.
> > If you need inspiration to understand look atwww.nsl.comespecially
> > the challengehttp://www.nsl.com/papers/kisntlisp.htm
>
> > This my blog post with even more confusing explanationhttp://tourdelisp.blogspot.com/2008/03/all-those-parenthesis-are-coun...
>
> As I noted on your blog, you should have a look at SERIES.
>
> Cheers
> --
> Marco- Hide quoted text -

I did, but I disagree about how things should be done. Basically I
want a single utility, map(actually it won't be even betetr to get rid
of it too) with all the control done through controler depending on
the generators supplied.Series introduces bunch of operators. The
difference is between automagically figure by yourself utility and  do
this package. Sorry because I can't explain any better.I think I will
have to figure this on my own, code it and give it for spin.
From: D Herring
Subject: Re: Is it possible to see how many arguments a function take?
Date: 
Message-ID: <H7ydnQIFhva6FXvanZ2dnUVZ_vKunZ2d@comcast.com>
Slobodan Blazeski wrote:
> Thanks to everybody for their answers. I think this approach got me
> into dead end, and I'll have to look elsewhere.
> Basically I want a facility (probably it has to be macro though I
> would prefer a function) that will inspect a function and behave
> according to it. baically I want a function to be some kind of
> controller, that will tell the facility how to bind,step, what to
> return etc.

I'm not sure what you want, but APPLY and MULTIPLE-VALUE-LIST might do 
most of what you need.  That, or use the slime functions which have 
implementation-specific code for such queries.

- Daniel