The plan is, to introduce type-aliases in the `iter` package:
type Yield[E any] = func(E) bool
type Yield2[K, V any] = func(K, V) bool
The reason to make these type-aliases instead of defined types is that it
should be possible to define iterators without needing to import the `iter`
package. But w
Hi community,
The type of yield occurs twice in the function declaration and
at the return statement.
```
func (s *Set[E]) All() iter.Seq[E] {
return func(yield func(E) bool) {
for v := range s.m {
if !yield(v) {
return
}
}
}
}
It's actually already possible: https://go.dev/play/p/75YYs1R94I2
--
Diego
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.
It would be cool to replace our m.Range() calls with plain for-loops.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
To
> /root/go/bin/wire-v0.5.0 gen -tags oss ./pkg/server
Is it running the binary "/root/go/bin/wire-v0.5.0 " at this point?
If so, it would seem to be a bug in that application. Debug as you would
any other go program. In particular, try running it under the race
detector. You don't give any ref