Anonymous user
Queue/Usage: Difference between revisions
m
→{{header|Elena}}
Line 746:
E also has queues in the standard library such as <code><import:org.erights.e.examples.concurrency.makeQueue></code>, but they are designed for concurrency purposes and do not report emptiness but rather return a promise for the next element.
=={{header|Elena}}==
ELENA
<lang elena>import system'collections
import extensions
public program()
{
// Create a queue and "push" items into it
var queue :=
queue
queue
queue
// "Pop" items from the queue in FIFO order
console
console
console
// To tell if the queue is empty, we check the count
console
// If we try to pop from an empty queue, an exception
// is thrown.
queue
=={{header|Elisa}}==
|