| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Interface to query procedure's arity. The API is taken from MzScheme (PLT Scheme).
An integer result indicates proc takes exactly that number
of arguments. An arity-at-least indicats proc takes
at least (arity-at-least-value arity-at-least)
arguments. The list indicates there are multiple procedures
with different arities.
Since one can add methods to an existing procedure or generic function
at any moment in Gauche, the value returned by arity only
indicates the current state of the procedure. It will change
if new method is added to the procedure/generic-function.
(arity cons) => 2 (arity list) => #<arity-at-least 0> (arity make) => (#<arity-at-least 1>) |
#t.
Otherwise returns #f.