[Top][All Lists]

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

Re: testing arity

From: Neil Jerram
Subject: Re: testing arity
Date: Sun, 23 Jul 2006 08:58:36 +0100
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

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.


reply via email to

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