A completely unique account of enumeration

How can we enumerate the inhabitants of an algebraic datatype? This paper explores a datatype generic solution that works for all regular types and indexed families . The enumerators presented here are provably both complete and unique —they will eventually produce every value exactly once—and fair...

Full description

Saved in:
Bibliographic Details
Published in:Proceedings of ACM on programming languages Vol. 6; no. ICFP; pp. 411 - 437
Main Authors: van der Rest, Cas, Swierstra, Wouter
Format: Journal Article
Language:English
Published: 29.08.2022
ISSN:2475-1421, 2475-1421
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary:How can we enumerate the inhabitants of an algebraic datatype? This paper explores a datatype generic solution that works for all regular types and indexed families . The enumerators presented here are provably both complete and unique —they will eventually produce every value exactly once—and fair —they avoid bias when composing enumerators. Finally, these enumerators memoise previously enumerated values whenever possible, thereby avoiding repeatedly recomputing recursive results.
ISSN:2475-1421
2475-1421
DOI:10.1145/3547636