In article <3F419D09.5070709 at ieee.org>, "Shane Holloway (IEEE)" <shane.holloway at ieee.org> wrote: > I assume this loss is due to restoring each context in the chain. (I > would need help verifying this assumption.) > What I would like to propose is a "yield *" type statement, where "yield > *collection" would have the equivalent > functionality of "for item in collection: yield item". The above example > would then appear as follows: It's been proposed before, with somewhat different syntax ("yield every" instead of "yield *"): http://tinyurl.com/kfvc The syntax alone doesn't help speed things up, but iirc Greg Ewing had some good ideas for doing this efficiently. I think the concensus was, though, that generators are so new that we haven't had enough experience to know what the best ways of using them are, so it would be premature to settle on chaining them this way. -- David Eppstein http://www.ics.uci.edu/~eppstein/ Univ. of California, Irvine, School of Information & Computer Science
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4