Stack: Difference between revisions
Content deleted Content added
Added solution for Action! |
Frink |
||
Line 3,099: | Line 3,099: | ||
Is stack empty now : false |
Is stack empty now : false |
||
</pre> |
</pre> |
||
=={{header|Frink}}== |
|||
Frink's <CODE>array</CODE> class has all of the methods to make it usable as a stack or a deque. The methods are called <CODE><I>array</I>.push[<I>x</I>]</CODE>, <CODE><I>array</I>.pop[]</CODE>, and <CODE><I>array</I>.isEmpty[]</CODE> |
|||
<lang frink>a = new array |
|||
a.push[1] |
|||
a.push[2] |
|||
a.peek[] |
|||
while ! isEmpty[a] |
|||
println[a.pop[]]</lang> |
|||
=={{header|Genie}}== |
=={{header|Genie}}== |