Skip to content

Commit

Permalink
doc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
markekraus committed Mar 18, 2022
1 parent 985cb4f commit 02a9100
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/genstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ func (s *Stack[T]) Pop() *Element[T] {
// The complexity is O(1).
func (s *Stack[T]) Len() int { return s.len }

// Init initializes or clears list l.
// Init initializes or clears stack s.
func (s *Stack[T]) Init() *Stack[T] {
s.root.next = &s.root
s.root.prev = &s.root
s.len = 0
return s
}

// New returns an initialized list.
// New returns an initialized stack.
func New[T any]() *Stack[T] {
return new(Stack[T]).Init()
}

0 comments on commit 02a9100

Please sign in to comment.