docs: update Peak function comment

This commit is contained in:
dudaodong
2022-06-02 22:26:26 +08:00
parent c68440ecf8
commit 1c2b1a2f02

View File

@@ -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")