Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Stack ¶
type Stack[T any] struct { // contains filtered or unexported fields }
Stack represents a generic LIFO (Last-In-First-Out) stack data structure.
func (*Stack[T]) Peek ¶
Peek returns the top item from the stack without removing it. Returns the zero value of T and false if the stack is empty.
func (*Stack[T]) Pop ¶
Pop removes and returns the top item from the stack. Returns the zero value of T and false if the stack is empty.
Click to show internal directories.
Click to hide internal directories.