Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,18 @@
procedure main(arglist)
queue := []
write("Usage:\nqueue x x x - x - - - - -\n\t- pops elements\n\teverything else pushes")
write("Queue is:")
every x := !arglist do {
case x of {
"-" : pop(queue) | write("pop(empty) failed.") # pop if the next arglist[i] is a -
default : put(queue,x) # push arglist[i]
}
if empty(queue) then writes("empty")
else every writes(!queue," ")
write()
}
end
procedure empty(X) #: fail if X is not empty
if *X = 0 then return
end