Persistent Data Structures Implementation with Limited Host Data Structures
Table of Contents
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.
Implementation
Pair
Node
LinkedList
List
Association List
Map
Object
Set
Sequence
Collection
Stack
Record
Queue
Binary Search Tree
Trie
Persistent List
Persistent Binary Search Tree
Leftist Heaps
Binomial Heaps
Splay Heaps
Red-Black Trees
Examples
API
https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L49
- first
- next
- rest
- second
- ffirst
- nfirst
- fnext