Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!rex!uflorida!mephisto!rutgers!texbell!attctc!pollux!ti-csl!m2!gateley From: gateley@m2.csc.ti.com (John Gateley) Newsgroups: comp.lang.scheme Subject: Re: Request for Comments: A new n-ary function construction Message-ID: <99887@ti-csl.csc.ti.com> Date: 28 Nov 89 19:09:57 GMT References: <891127-144857-1155@Xerox> <8911272329.AA07264@garlic.Stanford.EDU> Sender: news@ti-csl.csc.ti.com Reply-To: gateley@m2.UUCP (John Gateley) Organization: TI Computer Science Center, Dallas Lines: 30 In article <8911272329.AA07264@garlic.Stanford.EDU> mkatz@GARLIC.STANFORD.EDU (Morris Katz) writes: >[...] >Return-arity is the procedure which returns information about the number of >return values to be returned by a function. This seems confusing: (return-arity (lambda (x) (values 1 2 3))) => 3 ((lambda (x) (values 1 2 3) 'dummy) => three values. A function which return-arity says returns three values actually returns 3 values. I forget the name of Pavel's rest arg indicator, call it "rest". (lambda ("rest" rest-fn) (return-arity rest-fn)) => the number of values passed as arguments ((lambda ("rest" rest-fn) (rest-fn 0)) arg1 arg2 arg3) => a single value! A function which return-arity says returns three values actually returns a single value. So, Pavel's new rest-functions have to be handled differently by your return-arity procedure. Or, I am missing something. John gateley@m2.csc.ti.com