Abstract
This article presents a convenient and efficient procedural interface that allows the definition and use of procedures with optional arguments and indefinite numbers of arguments without resorting to the use of a language-dependent data structure in which to store the arguments. This interface solves many of the problems inherent in the use of lists in Lisp and Scheme to store indefinite numbers of arguments. Simple recursion can be used to consume such arguments without the complexity problems that are caused by the use of the Lisp procedureapply on argument lists. A natural extension to the interface to support multiple return values is presented.
Similar content being viewed by others
References
Bellot, P. and Jay, V. A theory for natural modelisation and implementation of functions with variable arity. InProceedings of the 1987 Conference on Functional Programming and Computer Architecture, Kahn, G., editor,Lecture Notes in Computer Science No. 274 (September 1987) 212–233.
Hewitt, C. E. and Smith, B. Towards a programming apprentice.IEEE Transactions on Software Engineering,SE-1, 1 (March 1975) 26–45.
Landin, P. J. The next 700 programming languages.Communications of the ACM,9, 3 (March 1966) 157–166.
Milner, R. A proposal for Standard ML.Conference Record of the 1984 ACM Symposium on LISP and Functional Programming (August 1984) 184–197.
Rees, J. A. and Clinger, W. The revised3 report on the algorithmic language scheme.SIGPLAN Notices,21, 12 (December 1986) 37–79.
Steele Jr., G. L.Common Lisp: The Language. Digital Press (1984).
Author information
Authors and Affiliations
Additional information
This material is based on work supported by the National Science Foundation under grant number CCR-8803432 and by Sandia National Laboratories under contract number 06-06211. A preliminary version of this article was presented at the 1988 ACM Conference on Lisp and Functional Programming.
Rights and permissions
About this article
Cite this article
Dybvig, R.K., Hieb, R. A new approach to procedures with variable arity. Lisp and Symbolic Computation 3, 229–244 (1990). https://doi.org/10.1007/BF01806099
Issue Date:
DOI: https://doi.org/10.1007/BF01806099