Re: [Chicken-users] Runtime arity?

2008-01-31 Thread Kon Lovett
On Jan 31, 2008, at 5:48 AM, felix winkelmann wrote: On Jan 29, 2008 6:25 PM, Kon Lovett <[EMAIL PROTECTED]> wrote: Yeah, it seems we need a database of the built-in's "procedure- information". Oh well, one more todo. Is it really necessary to allow accessing the lambda-lists of primitiv

Re: [Chicken-users] Runtime arity?

2008-01-31 Thread felix winkelmann
On Jan 29, 2008 6:25 PM, Kon Lovett <[EMAIL PROTECTED]> wrote: > > Yeah, it seems we need a database of the built-in's "procedure- > information". Oh well, one more todo. > Is it really necessary to allow accessing the lambda-lists of primitives? The lambda info object is a string - parsing it all

Re: [Chicken-users] Runtime arity?

2008-01-29 Thread Mark Fredrickson
Thanks for the info, Kon. I've created a ticket to track this: http://trac.callcc.org/ticket/417 For now, I'll just special case for my needs. Cheers, -M On Jan 29, 2008 12:52 PM, Kon Lovett <[EMAIL PROTECTED]> wrote: > > On Jan 29, 2008, at 10:37 AM, John Cowan wrote: > > > Graham Fawcett scri

Re: [Chicken-users] Runtime arity?

2008-01-29 Thread Kon Lovett
On Jan 29, 2008, at 10:37 AM, John Cowan wrote: Graham Fawcett scripsit: Hm, is it just primitive C functions that need better "procedure information"? It might be easier to fix that, than to build and maintain a database. Really only the primitives that are also user-exposed, like + but un

Re: [Chicken-users] Runtime arity?

2008-01-29 Thread John Cowan
Graham Fawcett scripsit: > Hm, is it just primitive C functions that need better "procedure > information"? It might be easier to fix that, than to build and > maintain a database. Really only the primitives that are also user-exposed, like + but unlike cons (which is not, technically, a primitiv

Re: [Chicken-users] Runtime arity?

2008-01-29 Thread Graham Fawcett
On Jan 29, 2008 12:25 PM, Kon Lovett <[EMAIL PROTECTED]> wrote: > On Jan 29, 2008, at 9:18 AM, John Cowan wrote: > > Graham Fawcett scripsit: > > > >> It's of less use when the procedure takes variable arguments, though, > > Sometimes you get a useful result: > > > > (procedure-information li

Re: [Chicken-users] Runtime arity?

2008-01-29 Thread Kon Lovett
On Jan 29, 2008, at 9:18 AM, John Cowan wrote: Graham Fawcett scripsit: It's of less use when the procedure takes variable arguments, though, Sometimes you get a useful result: (procedure-information list) => (list . lst120) And sometimes you don't: (procedure-information

Re: [Chicken-users] Runtime arity?

2008-01-29 Thread John Cowan
Graham Fawcett scripsit: > It's of less use when the procedure takes variable arguments, though, Sometimes you get a useful result: (procedure-information list) => (list . lst120) And sometimes you don't: (procedure-information +) => C_plus -- John Cowan [EMAIL PROTECTED]

Re: [Chicken-users] Runtime arity?

2008-01-29 Thread Graham Fawcett
On Jan 29, 2008 11:28 AM, Mark Fredrickson <[EMAIL PROTECTED]> wrote: > Is it possible to determine at run time the arity of function? I'm > thinking something like > > (arity (lambda (x y z) (* x y z))) > => 3 You can use 'procedure-information': (procedure-information (lambda (x y z) (* x y z))

[Chicken-users] Runtime arity?

2008-01-29 Thread Mark Fredrickson
Is it possible to determine at run time the arity of function? I'm thinking something like (arity (lambda (x y z) (* x y z))) => 3 Something that could also inform me about "rest" params would useful too. My searching of the wiki has turned up no info. Thanks in advance, -Mark ___