guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: testing arity


From: Jon Wilson
Subject: Re: testing arity
Date: Sun, 23 Jul 2006 20:01:05 -0500
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050324)

Thanks, Neil.  Sounds like an excellent answer!
Regards,
Jon

Neil Jerram wrote:
address@hidden writes:


On Sat, Jul 22, 2006 at 11:19:28AM -0500, Jon Wilson wrote:

Hi,
Is there a good way to determine the number of arguments that a given procedure will take?

Here's a fishing rod ;-)

| address@hidden:~$ guile
| guile> (apropos "arity")
| (ice-9 session): arity  #<procedure arity (obj)>
| guile> (arity apropos)
| 1 or more arguments: `rgx', the rest in `options'.
| guile>


And if you're not keen on parsing arity's output, see its definition
in (ice-9 session) for the procedure properties that it queries to
produce this.


Also, on an unrelated note, is it possible to define values (as in (lambda () (values 1 2)) ) in terms of McCarthy's original seven lisp primitives? Or would this question be better asked somewhere else (like c.l.scheme)?


Yes, sounds to me like a question for c.l.scheme.

Regards,
     Neil






reply via email to

[Prev in Thread] Current Thread [Next in Thread]