Values returns an iterator that yields the elements of the bitmap in increasing order. Starting with Go 1.23, users can use a for loop to iterate over it.
(b *Bitmap)
| 6 | // increasing order. Starting with Go 1.23, users can use a for loop to iterate |
| 7 | // over it. |
| 8 | func Values(b *Bitmap) iter.Seq[uint32] { |
| 9 | return func(yield func(uint32) bool) { |
| 10 | it := b.Iterator() |
| 11 | for it.HasNext() { |
| 12 | if !yield(it.Next()) { |
| 13 | return |
| 14 | } |
| 15 | } |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | // Backward returns an iterator that yields the elements of the bitmap in |
| 20 | // decreasing order. Starting with Go 1.23, users can use a for loop to iterate |
searching dependent graphs…