In Java there is a nice library class java.util.Stack which implements push and pop methods.
Is there anything similar in Objective C?
I found only MutableArray. Seems weird I’d have to implement such a basic thing as a stack, there must be something like “NSStack”, “NSQueue” and other similar stuff.
I’ve got a stack implementation here. It uses
NSMutableArrayto do the dirty work which really isn’t that bad. But there is nothing built in to Foundation.