Generalising and dualising the third list-homomorphism theorem: Functional pearl

Shin Cheng Mu, Akimasa Morihata

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

2 Citations (Scopus)

Abstract

The third list-homomorphism theorem says that a function is a list homomorphism if it can be described as an instance of both a foldr and a foldl. We prove a dual theorem for unfolds and generalise both theorems to trees: if a function generating a list can be described both as an unfoldr and an unfoldl, the list can be generated from the middle, and a function that processes or builds a tree both upwards and downwards may independently process/build a subtree and its one-hole context. The point-free, relational formalism helps to reveal the beautiful symmetry hidden in the theorem.

Original languageEnglish
Title of host publicationICFP'11 - Proceedings of the 2011 ACM SIGPLAN International Conference on Functional Programming
Pages385-391
Number of pages7
DOIs
Publication statusPublished - 2011 Oct 19
Event16th ACM SIGPLAN International Conference on Functional Programming, ICFP'11 - Tokyo, Japan
Duration: 2011 Sep 192011 Sep 21

Publication series

NameProceedings of the ACM SIGPLAN International Conference on Functional Programming, ICFP

Other

Other16th ACM SIGPLAN International Conference on Functional Programming, ICFP'11
CountryJapan
CityTokyo
Period11/9/1911/9/21

Keywords

  • Program derivation
  • Third list homomorphism theorem

ASJC Scopus subject areas

  • Software

Cite this