RosettaCodeData/Task/Stack/EasyLang/stack.easy

21 lines
255 B
Text
Raw Permalink Normal View History

2024-03-06 22:25:12 -08:00
stack[] = [ ]
2025-06-11 20:16:52 -04:00
proc push v .
2024-03-06 22:25:12 -08:00
stack[] &= v
.
func pop .
2024-04-19 16:56:29 -07:00
lng = len stack[]
2025-06-11 20:16:52 -04:00
if lng = 0 : return 0 / 0
2024-04-19 16:56:29 -07:00
r = stack[lng]
2024-03-06 22:25:12 -08:00
len stack[] -1
return r
.
func empty .
return if len stack[] = 0
.
push 2
push 11
push 34
while empty = 0
print pop
.