41

Functional Data Structures*

Chris Okasaki

United States Military Academy

41.1Introduction

Data Structures in Functional LanguagesFunctional Data Structures in Mainstream Languages

41.2Stacks: A Simple Example

41.3Binary Search Trees: Path Copying

41.4Skew Heaps: Amortization and Lazy Evaluation

Analysis of Lazy Skew Heaps

41.5Difficulties

41.6Further Reading

Acknowledgments

References

41.1Introduction

A functional data structure is a data structure that is suitable for implementation in a functional programming language, or for coding in an ordinary language like C or Java using a functional style. Functional data structures are closely related to persistent data structures and immutable data structures—in fact, the three terms are often ...

Get Handbook of Data Structures and Applications, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.