https://github.com/jeffersono7/queue
Queue wrapper module of erlang
https://github.com/jeffersono7/queue
elixir queue
Last synced: 4 months ago
JSON representation
Queue wrapper module of erlang
- Host: GitHub
- URL: https://github.com/jeffersono7/queue
- Owner: jeffersono7
- License: apache-2.0
- Created: 2021-12-24T18:55:53.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-30T09:40:18.000Z (over 4 years ago)
- Last Synced: 2025-10-21T15:09:37.390Z (8 months ago)
- Topics: elixir, queue
- Language: Elixir
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Queue
**Modules to work with queue**
## Installation
The package can be installed
by adding `queue` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:queue_tool, "~> 0.1.2"}
]
end
```
## Usage
### Queue module
*This module implements Enumerable protocol.*
``` elixir
queue = Queue.new()
#Queue
iex> queue = Queue.inside(queue, 1)
iex> 1 == Queue.out(queue)
true
```
### Queue agent module
``` elixir
iex> Queue.Agent.start_link(nil)
iex> Queue.Agent.inside(1)
iex> out = Queue.Agent.out()
iex> out == 1
true
```
[https://hexdocs.pm/queue](https://hexdocs.pm/queue_tool).