Acta Informatica

, Volume 21, Issue 3, pp 239–250

Using circular programs to eliminate multiple traversals of data

Authors

  • R. S. Bird
    • Programming Research GroupOxford University
Article

DOI: 10.1007/BF00264249

Cite this article as:
Bird, R.S. Acta Informatica (1984) 21: 239. doi:10.1007/BF00264249

Summary

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.

Copyright information

© Springer-Verlag 1984