Zipper-based modular and deforested computations

Pedro Martins, João Paulo Fernandes, João Saraiva

Research output: Contribution to journalArticlepeer-review


In this paper we present a methodology to implement multiple traversal algorithms in a functional programming setting. The implementations we obtain s of highly modular and intermediate structure free programs, that rely on the concept of functional zippers to navigate on data structures. Even though our methodology is developed and presented under Haskell, a lazy functional language, we do not make essential use of laziness. This is an essential difference with respect to other attribute grammar embeddings. This also means that an approach similar to ours can be followed in a strict functional setting such as Ocaml, for example. In the paper, our technique is applied to a significant number of problems that are well-known to the functional programming community, demonstrating its practical interest.

Original languageEnglish (US)
Pages (from-to)407-427
Number of pages21
JournalLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
StatePublished - Mar 21 2015


  • Deforested computation
  • Functional programming
  • Generic programming

ASJC Scopus subject areas

  • Theoretical Computer Science
  • General Computer Science


Dive into the research topics of 'Zipper-based modular and deforested computations'. Together they form a unique fingerprint.

Cite this