[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: proposing a simpler mechanism
Thomas Bushnell BSG wrote:
On Fri, 2009-11-13 at 11:55 -0800, Arthur A. Gleckler wrote:
Case-lambda is not a part of standard scheme. If you mean srfi-16,
notice the way the reference implementation works. It defines a
procedure with a formals list that looks like this:
Case-lambda is part of R6RS.
Thanks for the correction; I'm surprised, but not surprised. In any
case, my comments are the same. If the implementation in r6rs is any
guide, then what--*exactly*--is the arity supposed to be, if it's not
I was asked "what's the arity of read?". I'll ask, what's the arity of
((x) (list x))))
And what's the arity of bar:
(define (bar . args) args)
If you tell me that the arity of foo is 1, and the arity of bar is "any
number", then the example definiton of case-lambda in r6rs must be
The arity of foo, if it has one, may be 1. There are many other
acceptable arities, but it must include 1.
The arity of bar, if it has one, must be 0 or more.
There is nothing incorrect about the example definition of case-lambda