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 is an implementation of stack container.
func (*Stack[T]) Pop ¶
func (s *Stack[T]) Pop() (top T)
Pop returns and deletes the last stack element.
func (*Stack[T]) PopPush ¶
func (s *Stack[T]) PopPush(f T) (popped T)
PopPush executes Pop and Push operations in sequence.
func (*Stack[T]) TopOffsetFn ¶
TopOffsetFn calls fn with the last stack element at offset.
Click to show internal directories.
Click to hide internal directories.