Watch out for that tree! A tutorial on shortcut deforestation

João Paulo Fernandes, Jácome Cunha, João Saraiva, Alberto Pardo

Research output: Chapter in Book/Report/Conference proceedingConference contribution


Functional programmers are strong enthusiasts of modular solutions to programming problems. Since software characteristics such as readability or maintainability are often directly proportional to modularity, this programming style naturally contributes to the beauty of functional programs. Unfortunately, in return of this beauty we often sacrifice efficiency: modular programs rely, at runtime, on the creation, use and elimination of intermediate data structures to connect its components. In this tutorial paper, we study an advanced technique that attempts to retain the best of this two worlds: (i) it allows programmers to implement beautiful, modular programs (ii) it shows how to transform such programs, in a way that can be incorporated in a compiler, into programs that do not construct any intermediate structure.

Original languageEnglish (US)
Title of host publicationCentral European Functional Programming School - 6th Summer School, CEFP 2015, Revised Selected Papers
EditorsViktória Zsók, Zoltán Porkoláb, Zoltán Horváth
PublisherSpringer Verlag
Number of pages41
ISBN (Print)9783030283452
StatePublished - 2019
Event6th Central European Functional Programming School, CEFP 2015 - Budapest, Hungary
Duration: Jul 6 2015Jul 10 2015

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume10094 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349


Conference6th Central European Functional Programming School, CEFP 2015

ASJC Scopus subject areas

  • Theoretical Computer Science
  • General Computer Science


Dive into the research topics of 'Watch out for that tree! A tutorial on shortcut deforestation'. Together they form a unique fingerprint.

Cite this