Data update
This commit is contained in:
parent
ed705008a8
commit
0df55f9f24
2196 changed files with 32999 additions and 3075 deletions
|
|
@ -6,9 +6,9 @@ public program()
|
|||
// Create a queue and "push" items into it
|
||||
var queue := new Queue();
|
||||
|
||||
queue.push:1;
|
||||
queue.push:3;
|
||||
queue.push:5;
|
||||
queue.push(1);
|
||||
queue.push(3);
|
||||
queue.push(5);
|
||||
|
||||
// "Pop" items from the queue in FIFO order
|
||||
console.printLine(queue.pop()); // 1
|
||||
|
|
@ -20,5 +20,5 @@ public program()
|
|||
|
||||
// If we try to pop from an empty queue, an exception
|
||||
// is thrown.
|
||||
queue.pop() \\ on:(e){ console.writeLine:"Queue empty." }
|
||||
queue.pop() \\ on::(e){ console.writeLine("Queue empty.") }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue