Go 1.22.0 introduces a new experiment for range functions. Have you tried them out? What do you think it can make easier to accomplish?
I haven’t tried it no😅
@xuu Oh, I wasn’t aware of this! Thanks for bringing it to my attention.
I do like that they move away from one shared variable per loop to an own one per iteration. That makes sooo much more sense. I don’t hit that often, but it happened a few times in the past and getting this figured out is not the easiest thing in the world.
I have to read up on the yield functions. From your examples I fear iterators would have been more useful. Let’s see.
@xuu These are indeed iterators. Very weird syntax, though.
Things can get very interesting when we add the iter.Pull function in the mix. It works like pythons yield from.