A Simple and Efficient Implementation Of Higher-Order Functions In Lisp

Citation

Georgeff, M. P., & Bodnar, S. F. (1984). A simple and efficient implementation of higher-order functions in LISP. Center for the Study of Language and Information, Leland Stanford Junior University.

Abstract

A relatively simple method for handling higher-order functions (funargs) in LISP is described. It is also shown how this scheme allows extension of the LISP language to include partial application of functions.

The basis of the approach is to defer evaluation of function-valued expressions until sufficient arguments have been accumulated to reduce the expression to a nonfunctional value. This results in stacklike environment structures rather than the treelike structures produced by standard evaluation schemes. Consequently, the evaluator can be implemented on a standard runtime stack without requiring the complex storage management schemes usually employed for handling higher-order functions.

A full version of LISP has been implemented by modifying the FRANZ LISP interpreter to incorporate the new scheme. These modifications prove to be both simple and efficient.


Read more from SRI

  • surgeons around a surgical robot

    The SRI research behind today’s surgical robotics

    Intuitive’s da Vinci 5 system represents a major leap in robotic-assisted medicine. It all started at SRI, which continues to advance teleoperation technologies.

  • a collage of digital graphs

    A banner year for quantum

    SRI-managed QED-C’s annual report on quantum trends captures an industry accelerating rapidly from technical promise toward major global impact.

  • ICE Cube containing SRI’s aerogel experiment, photographed prior to launch. Source: Aerospace Applications North America

    An SRI carbon capture experiment launches into space

    By synthesizing carbon-absorbing aerogels in microgravity, SRI research will give us a rare glimpse into how these materials could be radically improved.