guile-user
[Top][All Lists]
Advanced

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

testing arity


From: Jon Wilson
Subject: testing arity
Date: Sat, 22 Jul 2006 11:19:28 -0500
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050324)

Hi,
Is there a good way to determine the number of arguments that a given procedure will take? I suppose I can look at
(source proc)
and extract the list of formals, and write a procedure which does this automatically, but I'd hate to reinvent the wheel. Also, I'm not sure how well using source will work when we have optional or keyword arguments.

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)?
Regards,
Jon




reply via email to

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