Documentation
¶
Index ¶
- Constants
- type Stack
- func (s *Stack[T]) Cap() int
- func (s *Stack[T]) Drain() []T
- func (s *Stack[T]) Index(fn func(T) bool) int
- func (s *Stack[T]) Iterate(fn func(T) bool)
- func (s *Stack[T]) IterateRange(lo, hi int, fn func(T) bool)
- func (s *Stack[T]) Peek() T
- func (s *Stack[T]) PeekIndex(i int) T
- func (s *Stack[T]) Pop() T
- func (s *Stack[T]) Push(e T)
- func (s *Stack[T]) Reverse()
- func (s *Stack[T]) Size() int
- func (s *Stack[T]) String() string
- type Stack2
Constants ¶
View Source
const (
MinCap = 2
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Stack ¶
type Stack[T any] struct { // contains filtered or unexported fields }
func (*Stack[T]) IterateRange ¶
Click to show internal directories.
Click to hide internal directories.