Re: Arity count

2016-07-25 Thread Alex Miller
It might be helpful to back up a step and explain why you need to do this? On Monday, July 25, 2016 at 10:14:16 AM UTC-5, Riccardo Di Meo wrote: > > Hi! > > It's a *very* old thread, but is there any news about this? I mean, is > there a way to find the list of accepted arities of an anonymous

Re: Arity count

2016-07-25 Thread Riccardo Di Meo
Hi! Il giorno mercoledì 19 agosto 2009 21:16:35 UTC+2, John Harrop ha scritto: > > On Wed, Aug 19, 2009 at 10:03 AM, Achim Passen > wrote: > >> Beware! This snippet relies on unexposed details of clojure's current >> implementation. It might stop working tomorrow, so it's

Arity count

2009-08-19 Thread lancecarlson
Is there a way to introspect a function to get its arity? I know some functions have an arbitrary amount of arguments, but knowing the count on finite argument lists and whether or not a function accepts an infinite list would be very useful. Also, hints on what types a functions arguments accept

Re: Arity count

2009-08-19 Thread Sean Devlin
Check the metadata arglist. For example, (:arglists (meta #'map)) If you want to automate this, you'll need a macro. On Aug 19, 4:24 am, lancecarlson lancecarl...@gmail.com wrote: Is there a way to introspect a function to get its arity? I know some functions have an arbitrary amount of

Re: Arity count

2009-08-19 Thread Meikel Brandmeyer
Hi, On Aug 19, 10:24 am, lancecarlson lancecarl...@gmail.com wrote: Is there a way to introspect a function to get its arity? I know some functions have an arbitrary amount of arguments, but knowing the count on finite argument lists and whether or not a function accepts an infinite list

Re: Arity count

2009-08-19 Thread Achim Passen
Hi! Am 19.08.2009 um 10:24 schrieb lancecarlson: Is there a way to introspect a function to get its arity? I know some functions have an arbitrary amount of arguments, but knowing the count on finite argument lists and whether or not a function accepts an infinite list would be very useful.

Re: Arity count

2009-08-19 Thread John Harrop
On Wed, Aug 19, 2009 at 10:03 AM, Achim Passen achim.pas...@gmail.comwrote: Beware! This snippet relies on unexposed details of clojure's current implementation. It might stop working tomorrow, so it's definitely not intended for production use, but it might help with debbuging/exploring.