Documentation ¶ Index ¶ type Node type Stack func FromSlice[T any](slice []T) *Stack[T] func NewStack[T any]() *Stack[T] func (s *Stack[T]) Clear() func (s *Stack[T]) IsEmpty() bool func (s *Stack[T]) Length() int func (s *Stack[T]) Peek() (*T, bool) func (s *Stack[T]) Pop() (*T, bool) func (s *Stack[T]) Push(value *T) *Stack[T] func (s *Stack[T]) ToSlice() []T Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Node ¶ type Node[T any] struct { Value *T Prev *Node[T] Next *Node[T] } type Stack ¶ type Stack[T any] struct { // contains filtered or unexported fields } func FromSlice ¶ func FromSlice[T any](slice []T) *Stack[T] func NewStack ¶ func NewStack[T any]() *Stack[T] func (*Stack[T]) Clear ¶ func (s *Stack[T]) Clear() func (*Stack[T]) IsEmpty ¶ func (s *Stack[T]) IsEmpty() bool func (*Stack[T]) Length ¶ func (s *Stack[T]) Length() int func (*Stack[T]) Peek ¶ func (s *Stack[T]) Peek() (*T, bool) func (*Stack[T]) Pop ¶ func (s *Stack[T]) Pop() (*T, bool) func (*Stack[T]) Push ¶ func (s *Stack[T]) Push(value *T) *Stack[T] func (*Stack[T]) ToSlice ¶ func (s *Stack[T]) ToSlice() []T Source Files ¶ View all Source files node.go stack.go Click to show internal directories. Click to hide internal directories.