Queue/Usage: Difference between revisions

Added Oz.
(→‎{{header|JavaScript}}: must use built-in objects (Array) for this task)
(Added Oz.)
Line 463:
# Queue.is_empty q;;
- : bool = true</lang>
 
=={{header|Oz}}==
<lang oz>declare
[Queue] = {Link ['x-oz://system/adt/Queue.ozf']}
MyQueue = {Queue.new}
in
{MyQueue.isEmpty} = true
{MyQueue.put foo}
{MyQueue.put bar}
{MyQueue.put baz}
{MyQueue.isEmpty} = false
{Show {MyQueue.get}} %% foo
{Show {MyQueue.get}} %% bar
{Show {MyQueue.get}} %% baz</lang>
 
=={{header|Perl}}==
Perl has built-in support to these operations:
Anonymous user