Documentation
¶
Overview ¶
Package linked contains an implementation of a stack backed by a linked list.
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 stack.
func (*Stack[T]) Peek ¶
func (s *Stack[T]) Peek() T
Peek returns the element at the top of the stack. If the stack is empty - default value for element's type is returned.
Click to show internal directories.
Click to hide internal directories.