in reply to Re: How can I create an iterator that works inside foreach() (updated)
in thread How can I create an iterator that works inside foreach()
I'm embarrassed to see that it was on page 123 of High Order Perl and I missed it. An example with a foreach would have helped -- but MJD did such an awesome job with a lot of complicated topics in that book that there's no way I'm going to complain! I should have read the chapter more carefully.
There's a web site called programming-idioms.org which provides a database of idioms implemented in different languages for easy comparison. The reason I asked about this is that I made a contribution to the idiom for generator functions but after additional testing realized it didn't work in a foreeach loop. I'll use your suggestion to update it.
Here's a link to the programming idioms page I'll be modifying:
Idiom #319 generator functions
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: How can I create an iterator that works inside foreach() (updated)
by hv (Prior) on Nov 05, 2022 at 04:04 UTC | |
Re^3: How can I create an iterator that works inside foreach() (updated)
by AnomalousMonk (Archbishop) on Nov 05, 2022 at 03:27 UTC | |
Re^3: How can I create an iterator that works inside foreach() (updated)
by AnomalousMonk (Archbishop) on Nov 05, 2022 at 03:55 UTC |