Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Stack ¶
type Stack[T comparable.Equality] struct { // contains filtered or unexported fields }
Stack is a generic type buildt on top of a slice
func (*Stack[T]) Peek ¶
Peek returns the top element of the stack or an error indicating that the stack is empty. Some times this is refered to a 'Top'
func (*Stack[T]) Pop ¶
Pop will remove the top element from the stack. An error is returned if the stack is empty.
Click to show internal directories.
Click to hide internal directories.