Skip to content

Commit

Permalink
Update README for Pop and Pop2
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitor De Mario authored and mmatczuk committed Aug 28, 2018
1 parent d974b86 commit 538a353
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,17 @@ the given t Set.
```go
func (s *Set) Pop() T
```
Pop deletes and return an item from the Set. The underlying Set s is modified.
If Set is empty, nil is returned.
Pop deletes and returns an item from the Set. The underlying Set s is modified.
If Set is empty, the zero value is returned.

#### func (*Set) Pop2

```go
func (s *Set) Pop2() (T, bool)
```
Pop2 tries to delete and return an item from the Set. The underlying Set s is modified.
The second value is a bool that is true if the item existed in the set, and false if not.
If Set is empty, the zero value and false are returned.

#### func (*Set) Remove

Expand Down

0 comments on commit 538a353

Please sign in to comment.