RosettaCodeData/Task/Queue-Definition/Wren/queue-definition.wren

10 lines
203 B
Text
Raw Permalink Normal View History

2024-03-06 22:25:12 -08:00
import "./queue" for Queue
2023-07-01 11:58:00 -04:00
var q = Queue.new()
var item = q.pop()
if (item == null) {
System.print("ERROR: attempted to pop from an empty queue")
} else {
System.print("'%(item)' was popped")
}