Acta Informatica

, Volume 21, Issue 3, pp 239–250

Using circular programs to eliminate multiple traversals of data

  • R. S. Bird


This paper describes a technique for transforming functional programs that repeatedly traverse a data structure into more efficient alternatives that do not. The transformation makes essential use of lazy evaluation and local recursion (such as provided by letrec, or its equivalent) to build a circular program that, on one pass over the structure, determines the effects of the individual traversals and then combines them.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag 1984

Authors and Affiliations

  • R. S. Bird
    • 1
  1. 1.Programming Research GroupOxford UniversityOxfordUK

Personalised recommendations