Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
14
Task/Queue-Usage/UNIX-Shell/queue-usage.sh
Normal file
14
Task/Queue-Usage/UNIX-Shell/queue-usage.sh
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# any valid variable name can be used as a queue without initialization
|
||||
|
||||
queue_empty foo && echo foo is empty || echo foo is not empty
|
||||
|
||||
queue_push foo bar
|
||||
queue_push foo baz
|
||||
queue_push foo "element with spaces"
|
||||
|
||||
queue_empty foo && echo foo is empty || echo foo is not empty
|
||||
|
||||
print "peek: $(queue_peek foo)"; queue_pop foo
|
||||
print "peek: $(queue_peek foo)"; queue_pop foo
|
||||
print "peek: $(queue_peek foo)"; queue_pop foo
|
||||
print "peek: $(queue_peek foo)"; queue_pop foo
|
||||
Loading…
Add table
Add a link
Reference in a new issue