Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ninegua/mutable-queue.mo
Motoko module of a mutable queue data structure
https://github.com/ninegua/mutable-queue.mo
Last synced: about 2 months ago
JSON representation
Motoko module of a mutable queue data structure
- Host: GitHub
- URL: https://github.com/ninegua/mutable-queue.mo
- Owner: ninegua
- License: mit
- Created: 2022-01-21T07:31:07.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-01-21T07:35:42.000Z (over 2 years ago)
- Last Synced: 2024-01-26T10:35:20.450Z (5 months ago)
- Language: Motoko
- Size: 4.88 KB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-motoko - mutable-queue.mo - Motoko module of a mutable queue data structure. (Libraries / Data structures)
README
# Mutable Queue
A [motoko] module of a mutable queue data structure supporting both `pushFront` and `pushBack` but only `popFront`.
It can be conveniently used for stable variables to hold a collection of values if you don't mind O(n) lookups.Internally it is just a linked list with both `first` and `last` pointers.
You can use this library with the [vessel] package manager.
## Development
Documentation is non-existent but functions should be self-explanatory given their types.
If you have installed a [nix] environment, you can run the tests like this:
```
nix-shell
cd test
make
```[motoko]: https://github.com/dfinity/motoko
[vessel]: https://github.com/dfinity/vessel