feature req: limited stack
- Posted by TheresNoTime Aug 23, 2013
- 1279 views
For example:
include std/stack.e stack MyStack = new(FILO, 20) for i = 1 to 21 do push(MyStack, i) end for ? size(MyStack) ? last(MyStack) ? top(MyStack)
Output:
20 2 21
It is useful for programming cached structures. May be, better to create my own type "cache"? Something similar to map, but with timestamps of last access.