Skip to content

jur0/lqueue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LQueue

Build Status Hex.pm

Double-ended queue with limited length. It can hold just specified amount of elements. If more are added, the elements from the top of the queue are (by default) discarded and the new ones added to the rear of the queue.

Installation

If available in Hex, the package can be installed by adding lqueue to your list of dependencies in mix.exs:

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

Usage

The limited queue implements the Enumerable, Collectable and Inspect protocols, so all the functions from them are available.

Apart from protocol function, there are others, implemented by LQueue module:

  • new/1
  • full?/1
  • clear/1
  • max_count/1
  • push/2
  • push_front/2
  • pop/1
  • pop_rear/1
  • get/1
  • get_rear/1
  • drop/1
  • drop_rear/1
  • from_list/2

About

Double-ended queue with limited length

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages