Proc. of a conference on Functional programming languages and computer architecture
Views: a way for pattern matching to cohabit with data abstraction
POPL '87 Proceedings of the 14th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
Data structures and program transformation
Science of Computer Programming
Functional programming with bananas, lenses, envelopes and barbed wire
Proceedings of the 5th ACM conference on Functional programming languages and computer architecture
PLDI '94 Proceedings of the ACM SIGPLAN 1994 conference on Programming language design and implementation
Inductive, coinductive, and pointed types
Proceedings of the first ACM SIGPLAN international conference on Functional programming
ML for the working programmer (2nd ed.)
ML for the working programmer (2nd ed.)
Revisiting catamorphisms over datatypes with embedded functions (or, programs from outer space)
POPL '96 Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Algebra of programming
ICFP '98 Proceedings of the third ACM SIGPLAN international conference on Functional programming
Fold and unfold for program semantics
ICFP '98 Proceedings of the third ACM SIGPLAN international conference on Functional programming
A Transformation System for Developing Recursive Programs
Journal of the ACM (JACM)
ICFP '00 Proceedings of the fifth ACM SIGPLAN international conference on Functional programming
Structure and Interpretation of Computer Programs
Structure and Interpretation of Computer Programs
Principles of Program Analysis
Principles of Program Analysis
A tutorial on the universality and expressiveness of fold
Journal of Functional Programming
Proceedings of the 27th Annual ACM Symposium on Applied Computing
Corecursive Featherweight Java
Proceedings of the 14th Workshop on Formal Techniques for Java-like Programs
Proceedings of the 15th Workshop on Formal Techniques for Java-like Programs
Computer Languages, Systems and Structures
Hi-index | 0.00 |
Cyclic data structures can be tricky to create and manipulate in declarative programming languages. In a declarative setting, a natural way to view cyclic structures is as denoting regular trees, those trees which may be infinite but have only a finite number of distinct subtrees. This paper shows how to implement the unfold (anamorphism) operator in both eager and lazy languages so as to create cyclic structures when the result is a regular tree as opposed to merely infinite lazy structures. The usual fold (catamorphism) operator when used with a strict combining function on any infinite tree yields an undefined result. As an alternative, this paper defines and show how to implement a cycfold operator with more useful semantics when used with a strict function on cyclic structures representing regular trees. This paper also introduces an abstract data type (cycamores) to simplify the use of cyclic structures representing regular trees in both eager and lazy languages. Implementions of cycamores in both SML and Haskell are presented.