1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-09 23:22:28 +08:00

feat: and Clear and IsEmpty func

This commit is contained in:
dudaodong
2022-02-10 17:41:51 +08:00
parent ade567a620
commit 85e1f711f5
8 changed files with 64 additions and 8 deletions

View File

@@ -73,8 +73,8 @@ func (s *LinkedStack[T]) Peak() (*T, error) {
return &s.top.Value, nil
}
// EmptyStack clear the stack data
func (s *LinkedStack[T]) EmptyStack() {
// Clear clear the stack data
func (s *LinkedStack[T]) Clear() {
s.top = nil
s.length = 0
}