Re: testing arity

2006-07-24 Thread rm
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

Re: testing arity

2006-07-23 Thread Jon Wilson
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 ;-) |

Re: testing arity

2006-07-23 Thread Kevin Ryde
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

Re: testing arity

2006-07-23 Thread Neil Jerram
[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

Re: testing arity

2006-07-22 Thread Jon Wilson
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

Re: testing arity

2006-07-22 Thread tomas
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

testing arity

2006-07-22 Thread Jon Wilson
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