Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
21
Task/Queue-Definition/Arturo/queue-definition.arturo
Normal file
21
Task/Queue-Definition/Arturo/queue-definition.arturo
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
define :queue [][
|
||||
init: [
|
||||
this\items: []
|
||||
]
|
||||
]
|
||||
|
||||
empty?: function [this :queue][
|
||||
zero? this\items
|
||||
]
|
||||
|
||||
push: function [this :queue, item][
|
||||
this\items: this\items ++ item
|
||||
]
|
||||
|
||||
pop: function [this :queue][
|
||||
ensure -> not? empty? this
|
||||
|
||||
result: this\items\0
|
||||
this\items: remove.index this\items 0
|
||||
return result
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue