Purely Functional Data Structures

Table of Contents

1. Background

Implement persistent data structures with limited use of host data structures (other than function definition and simple data types).

This works off of Okasaki's "Purely Functional Data Structures" and Immutable.js.

2. Code

3. Implementation

3.2. Node

3.3. LinkedList

3.4. List

3.6. Map

3.7. Object

3.8. Set

3.9. Sequence

3.10. Collection

3.11. Stack

3.12. Record

3.13. Queue

3.15. Trie

3.20. Splay Heaps

4. Examples

5. API