Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Stack ¶
type Stack[V any] struct { // contains filtered or unexported fields }
Stack represents a stack data structure. It is a LIFO (last in first out) data structure, which means that the last element added to the stack will be the first one to be removed.
func (*Stack[V]) Peek ¶
func (s *Stack[V]) Peek() *V
Peek returns the last element added to the stack without removing it.
Click to show internal directories.
Click to hide internal directories.