https://github.com/tejasbubane/functional-data-structures
Okasaki's data structures implemented in a course structure
https://github.com/tejasbubane/functional-data-structures
Last synced: about 1 month ago
JSON representation
Okasaki's data structures implemented in a course structure
- Host: GitHub
- URL: https://github.com/tejasbubane/functional-data-structures
- Owner: tejasbubane
- Created: 2019-02-13T15:36:24.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-24T10:52:12.000Z (over 7 years ago)
- Last Synced: 2025-01-13T03:09:34.638Z (over 1 year ago)
- Language: Haskell
- Homepage:
- Size: 37.1 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Okasaki's Functional Data Structures in Haskell
[](https://travis-ci.org/tejasbubane/functional-data-structures)
Data structures from [Okasaki's book](https://www.goodreads.com/book/show/594288.Purely_Functional_Data_Structures) in Haskell along with tests - so that you can implement and check your solutions.
### List of data structures:
* [List](src/List.hs)
* [BinarySearchTree](src/BinarySearchTree.hs)
* [LeftistHeap](src/LeftistHeap.hs)
* [BinomialHeap](src/BinomialHeap.hs)
* [RedBlackTree](src/RedBlackTree.hs)
* [Queue](src/Queue.hs)
* [AmortizedQueue](src/AmortizedQueue.hs)
* [Deque](src/Deque.hs)
* [Trie](src/Trie.hs)
Implementations can be found in `solutions` branch.
**Note:** This repo does not contain all of the structures from the book. These are the one which I mostly understood in first reading of the book and which were discussed in my talk at [Bangalore functional programming meetup](https://www.meetup.com/Bangalore-Functional-Programmers-Meetup/events/257190891/).
### Tests:
Tests are in `spec` directory.
Run individual tests:
```hs
stack test --test-arguments "-m "List""
```
Run all tests:
```hs
stack test
```