Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Queue-Definition/11l/queue-definition.11l
Normal file
16
Task/Queue-Definition/11l/queue-definition.11l
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
T FIFO
|
||||
[Int] contents
|
||||
|
||||
F push(item)
|
||||
.contents.append(item)
|
||||
F pop()
|
||||
R .contents.pop(0)
|
||||
F empty()
|
||||
R .contents.empty
|
||||
|
||||
V f = FIFO()
|
||||
f.push(3)
|
||||
f.push(2)
|
||||
f.push(1)
|
||||
L !f.empty()
|
||||
print(f.pop())
|
||||
Loading…
Add table
Add a link
Reference in a new issue