-
-
Notifications
You must be signed in to change notification settings - Fork 0
container objects
Containers are objects that hold other objects (sometimes I called them meta-objects, since one hardly uses them directly) get all of the methods of standard objects, plus 2 to 4 additional methods:
XXX distinguish between a sequence (where membership isn't important) NO, sequences are ad-hoc, anonymous containers and setsXXX
- the index operator[],
- or containment test (in) or size
One should be able to overload a single method, rather than the whole class, like the out>> method, so that it can return, say, the smallest element, or the last, or pop a member off of the stack. In fact, the container object may be such a object, inherited from the standard object.
This is a preliminary exploration. It may be that more methods will be necessary, like size or a test for non-zero, yet I believe these can be accommodated with get_state.... STUB
A built-in Stack object exists in the shell offering a First-In, Last-Out container. The shell stack can be accessed with what operator, symbol, or name?
The Stack(Container) adds push, pop
Singularity