Time for an 2014 update…
This commit is contained in:
parent
372c577f83
commit
09687c4926
2520 changed files with 34227 additions and 7318 deletions
12
Task/Stack/Deja-Vu/stack.djv
Normal file
12
Task/Stack/Deja-Vu/stack.djv
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
local :stack [] #lists used to be stacks in DV
|
||||
|
||||
push-to stack 1
|
||||
push-to stack 2
|
||||
push-to stack 3
|
||||
|
||||
!. pop-from stack #prints 3
|
||||
!. pop-from stack #prints 2
|
||||
!. pop-from stack #prints 1
|
||||
|
||||
if stack: #empty lists are falsy
|
||||
error #this stack should be empty now!
|
||||
Loading…
Add table
Add a link
Reference in a new issue