https://github.com/friendlymatthew/fredblacktrees
functional red black trees in typescript
https://github.com/friendlymatthew/fredblacktrees
Last synced: about 1 year ago
JSON representation
functional red black trees in typescript
- Host: GitHub
- URL: https://github.com/friendlymatthew/fredblacktrees
- Owner: friendlymatthew
- Created: 2024-05-13T22:00:17.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-05-13T22:02:15.000Z (about 2 years ago)
- Last Synced: 2025-02-06T08:12:30.306Z (over 1 year ago)
- Language: TypeScript
- Size: 37.1 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fredblacktrees
Functional red black trees written in typescript. Each insert incurs a new tree being created. That is:
```typescript
const t1 = Empty();
const t2 = insert(t1, 2);
const t3 = insert(t2, 3);
```
Traverse through the fred and black tree using the iterators in `iter.ts`.
Functional Pearls by Chris Okasaki: https://www.cs.tufts.edu/comp/150FP/archive/chris-okasaki/redblack99.pdf