Documentation
¶
Overview ¶
Package stack provides a generic stack implementation
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Stack ¶
type Stack[T any] []T
Stack provides a basic stack using a slice
func (*Stack[T]) Peek ¶
func (st *Stack[T]) Peek() T
Peek returns the last element on the stack. Returns nil / zero value if stack is empty.
Click to show internal directories.
Click to hide internal directories.