Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/samirsilwal/structures

A library of data structure with extended features for each structures.
https://github.com/samirsilwal/structures

functional-programming linked-list queue stack tail-recursion

Last synced: 5 days ago
JSON representation

A library of data structure with extended features for each structures.

Awesome Lists containing this project

README

        

# Structures

Structure is yet another fun custom collection adding some interesting features to existing js arrays features. Consists bunch of other structures like Stack, Queue as well.

Currently available collection structures are :-
- LinkedList
- Stack
- Queue

# New Features!
1. LinkedList

- **\+ operator** : Add two collection together of same type
- **flatten** : flattens the 2D collection in single
- **flatmap** : A monadic feature of collection, analogous to map followed by flatten
- **lhead & ltail** : extract first element and rest list of items repectively.
- **ltop & lbottom** : extract n - 1 element from the list and get last element of list respectively.

**NOTE** : These helpful methods conveniently help in implementing recursive logic in the collection.

2. Stack
- pile and unpile: Append another stack on top of other or remove a pile of stack

### Todos

- Write MORE Tests
- Conitnue to add more interesting functions.

License
----

MIT
----