Home

About

Advanced Search

Browse by Discipline

Scientific Societies

E-print Alerts

Add E-prints

E-print Network
FAQHELPSITE MAPCONTACT US


  Advanced Search  

 
When is a function a fold or an unfold? Jeremy Gibbons
 

Summary: When is a function a fold or an unfold?
Jeremy Gibbons
University of Oxford
Graham Hutton
University of Nottingham
Thorsten Altenkirch
University of Nottingham
April 29, 2002
Abstract
We give a necessary and sufficient condition for when a set-theoretic
function can be written using the recursion operator fold, and a dual
condition for the recursion operator unfold. The conditions are simple,
practically useful, and generic in the underlying datatype.
1 Introduction
The recursion operator fold encapsulates a common pattern for defining pro-
grams that consume values of a least fixpoint type such as finite lists. Dually,
the recursion operator unfold encapsulates a common pattern for defining pro-
grams that produce values of a greatest fixpoint type such as infinite lists or
streams. Theory and applications of fold abound -- see [11, 4] for recent
surveys -- while in recent years it has become increasingly clear that the less

  

Source: Altenkirch, Thorsten - School of Computer Science, University of Nottingham

 

Collections: Computer Technologies and Information Sciences