Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrEmpty = errors.New("empty stack")
)
Functions ¶
This section is empty.
Types ¶
type Stack ¶
type Stack[V any] struct { // contains filtered or unexported fields }
Stack stores elements in a slice and offers First-In-First-Out access.
func (*Stack[V]) Pop ¶
Pop removes the top of stack and returns it, if the stack is not empty. Returns ErrEmpty if the stack is empty.
Click to show internal directories.
Click to hide internal directories.