[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Request for Comments: A new n-ary function construction



   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
-------------------------------------------------------------------------------