Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!snorkelwacker!bloom-beacon!GARLIC.STANFORD.EDU!mkatz From: mkatz@GARLIC.STANFORD.EDU (Morris Katz) Newsgroups: comp.lang.scheme Subject: Request for Comments: A new n-ary function construction Message-ID: <8911271649.AA04492@garlic.Stanford.EDU> Date: 27 Nov 89 16:49:40 GMT References: <891122-121343-4098@Xerox> Sender: root@athena.mit.edu (Wizard A. Root) Organization: The Internet Lines: 24 Date: Wed, 22 Nov 89 11:55:42 PST From: Pavel.pa@xerox.com That is, you can now follow the ``required'' parameters by the marker string "arbitrary" and two identifiers. The first of these will, on invocation of the procedure, be bound to the number of ``extra'' arguments, those not accounted for by the required parameters; it is an exact integer. The second new identifier will be bound to a procedure of one argument, an exact non-negative integer less than the extra argument count; it returns the extra argument with that index. I believe that it would be much cleaner to only use the second of the two extra arguments. (i.e., the one which is bound to a procedure) The information about the number of optional arguments which are supplied can be aquired through the use of an arity function of the type previously discussed on the rrrs-authors mailing list during a discussion on multiple values. I support the arity approach because it is more general purpose and can be specified in a manner that is orthoginal to the rest of Scheme. Why put in a special purpose hack, when a more general solution is available. ------------------------------------------------------------------------------- Morry Katz katz@cs.stanford.edu -------------------------------------------------------------------------------