After I have argued that the current wording of SRFI 191 does not make
sense for a general R7RS implementation, here is a constructive
attempt to define the meaning of procedure arity (although I agree
with Kent Dybvig and Alex Shinn that it is probably not a good idea
for standardization):
1. Add the following to the end of 4.1.4 (in the R7RS): "Each
procedure created as the result of evaluating a lambda expression has
a well-defined arity, which is an integer interpreted as a bitset
whose nth bit is set if and only if the procedure *formally* can take
n arguments."
This is arguably not useful as it doesn't account for rest parsing,
whether ad-hoc or via something like let-optionals or let-keywords.
2. Add a similar text in 4.2.9. for case-lambda.
This is impossible with the definition of case-lambda as derived syntax
in R7RS. There are 7 axiomatic core forms of Scheme: define, set!,
lambda, if, begin, quote, define-syntax. We should not add to this list
without very good reason.
--
Alex