mirror of
https://github.com/tursom/GoCollections.git
synced 2025-01-14 13:00:40 +08:00
update
This commit is contained in:
parent
c7576d9b3b
commit
0fcabc8b65
BIN
GoCollections
Normal file
BIN
GoCollections
Normal file
Binary file not shown.
@ -6,7 +6,7 @@ type Queue interface {
|
||||
// Iterator MutableIterable
|
||||
Iterator() Iterator
|
||||
// MutableIterator MutableIterable
|
||||
MutableIterator() MutableIterator
|
||||
MutableIterator() *linkedListIterator
|
||||
|
||||
Push(element interface{}) exceptions.Exception
|
||||
Offer() (interface{}, exceptions.Exception)
|
||||
|
4
main.go
4
main.go
@ -23,10 +23,10 @@ func main() {
|
||||
}
|
||||
|
||||
_ = collections.LoopMutable(list, func(element interface{}, iterator collections.MutableIterator) (err exceptions.Exception) {
|
||||
if element.(int)&1 == 0 {
|
||||
if element.(int)&1 != 0 {
|
||||
err = iterator.Remove()
|
||||
fmt.Println(list)
|
||||
}
|
||||
fmt.Println(list)
|
||||
return
|
||||
})
|
||||
//for i := 0; i < 10; i++ {
|
||||
|
Loading…
Reference in New Issue
Block a user