Git Product home page Git Product logo

yaq's Introduction

Yaq

Elixir CI

Yet Another Queue module for Elixir

About

Yaq implements a double-ended queue in Elixir without using the Erlang :queue module. While very nice, :queue has a few limitations that I needed to work past:

  • Some of the commands in :queue return a badarg instead of best-effort values. For example, calling :queue(n, q) when n is larger than the size of q raises an ArgumentError instead of giving me some value less than n. This may be fine in many circumstances, but my use cases just ask for some value in return.
  • Getting the size of :queue is an O(N) operation, when it should be O(1)
  • I wanted a module that I could use with other common Elixir libraries, such as Enum
  • :queue is not very pipeable. The |> operator is very convenient and one of the killer features of Elixir

Yaq implements the Enum and Collectable protocols

Features

  • Double-ended quque
  • Implements Enumerable, Collectable protocols

Installation

The package can be installed by adding yaq to your list of dependencies in mix.exs:

def deps do
  [
    {:yaq, "~> 1.1"}
  ]
end

Documentation can be found at https://hexdocs.pm/yaq.

License

Copyright 2020 Nicholas David McKinney

Licensed under Apache License 2.0

Check LICENSE and NOTICE files for more information

yaq's People

Contributors

nulloranje avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.