GoCollections/collections/Stack.go
2022-03-21 11:02:41 +08:00

14 lines
305 B
Go

package collections
import "github.com/tursom/GoCollections/exceptions"
type Stack[T any] interface {
// Iterator MutableIterable
Iterator() Iterator[T]
// MutableIterator MutableIterable
MutableIterator() MutableIterator[T]
Push(element T) exceptions.Exception
Pop() (T, exceptions.Exception)
}