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? I suppose I can look at
> (source proc)
> and extract the list of formals, and write a procedure which does this
> automatically, but I
Thanks, Neil. Sounds like an excellent answer!
Regards,
Jon
Neil Jerram wrote:
[EMAIL PROTECTED] 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 ;-)
|
Neil Jerram <[EMAIL PROTECTED]> writes:
>
> 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.
(procedure-property obj 'arity) being the operative part, it gives a
list of "(required-count option
[EMAIL PROTECTED] 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 ;-)
>
> | [EMAIL PROTECTED]:~$ guile
> | guile> (apropos "arity")
> | (ice-9
Hi Ralf,
[EMAIL PROTECTED] wrote:
What doesn't work with 'arity'?
Ah. The answer to that question is "It is not documented in the guile
manual, nor in R5RS.".
Regards,
Jon
___
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mai
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 ;-)
| [EMAIL PROTECTED]:~$ guile
| guile> (apropos "arity")
| (ice-9 session): arity #
| guile> (arity apropo
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 sou