mirror of
https://github.com/duke-git/lancet.git
synced 2025-10-20 06:14:38 +08:00
docs: update Peak function comment
This commit is contained in:
@@ -47,7 +47,7 @@ func (s *ArrayStack[T]) Pop() (*T, error) {
|
||||
return &topItem, nil
|
||||
}
|
||||
|
||||
// Peak return the top element of stack then return it
|
||||
// Peak return the top element of stack
|
||||
func (s *ArrayStack[T]) Peak() (*T, error) {
|
||||
if s.IsEmpty() {
|
||||
return nil, errors.New("stack is empty")
|
||||
|
Reference in New Issue
Block a user