Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,21 +1,21 @@
|
|||
define :queue [][
|
||||
init: [
|
||||
define :queue [
|
||||
init: method [][
|
||||
this\items: []
|
||||
]
|
||||
]
|
||||
|
||||
empty?: function [this :queue][
|
||||
zero? this\items
|
||||
]
|
||||
empty?: method [][
|
||||
zero? this\items
|
||||
]
|
||||
|
||||
push: function [this :queue, item][
|
||||
this\items: this\items ++ item
|
||||
]
|
||||
push: method [item][
|
||||
this\items: this\items ++ item
|
||||
]
|
||||
|
||||
pop: function [this :queue][
|
||||
ensure -> not? empty? this
|
||||
pop: method [][
|
||||
ensure -> [not? this\empty?]
|
||||
|
||||
result: this\items\0
|
||||
this\items: remove.index this\items 0
|
||||
return result
|
||||
result: this\items\0
|
||||
this\items: remove.index this\items 0
|
||||
return result
|
||||
]
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue