Coroutining Folds with Hyperfunctions

Autor: J. Launchbury, S. Krstic, T. E. Sauerwein
Jazyk: angličtina
Rok vydání: 2013
Předmět:
Zdroj: Electronic Proceedings in Theoretical Computer Science, Vol 129, Iss Festschrift for Dave Schmidt, Pp 121-135 (2013)
Druh dokumentu: article
ISSN: 2075-2180
DOI: 10.4204/EPTCS.129.9
Popis: Fold functions are a general mechanism for computing over recursive data structures. First-order folds compute results bottom-up. With higher-order folds, computations that inherit attributes from above can also be expressed. In this paper, we explore folds over a form of recursive higher-order function, called hyperfunctions, and show that hyperfunctions allow fold computations to coroutine across data structures, as well as compute bottom up and top down. We use the compiler technique of foldr-build as an exemplar to show how hyperfunctions can be used.
Databáze: Directory of Open Access Journals