The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
DataStructure::Queue

Implemented by DataStructure::LinkedList and DataStructure::DoubleList

Has the following methods shift(), push($value), values(), empty(), size().

Nodes have the following methods: value().

Synonym: DataStructure::FIFO.

DataStructure::Stack

Implemented by DataStructure::LinkedList (with the reverse option) and DataStructure::DoubleList.

Has the following methods first(), push($value), pop(), values(), empty(), size().

Nodes have the following methods: value(), insert_after($value), next().

Note that, without the reverse option a DataStructure::LinkedList can also behave like a stack but you would need to use the less common shift and unshift pair of methods.

Synonym: DataStructure::LIFO.

DataStructure::OrderedSet

Implemented by DataStructure::BTree

Has the following methods insert($value), find($value), delete($value | $node), values(), empty(), size().