RosettaCodeData/Task/Stack/Quackery/stack.quackery

16 lines
583 B
Plaintext

[ size 1 = ] is isempty ( s --> b )
[ stack ] is mystack ( --> s )
mystack isempty if [ say "mystack is empty" cr cr ]
23 mystack put
mystack share echo say " is on the top of mystack" cr cr
mystack mystack put ( you can put anything on an ancillary stack, even itself! )
mystack share echo say " is on the top of mystack" cr cr
mystack take echo say " has been removed from mystack" cr cr
mystack take echo say " has been removed from mystack" cr cr
mystack isempty if [ say "mystack is empty" cr cr ]
say "you are in a maze of twisty little passages, all alike"