4 ms·
Looks exciting. I'm interested in how this might relate to the following use of generators from Python: def gen(*items): for x in items: if x
by pc2g4d 9y ago
Looks exciting. I'm interested in how this might relate to the following use of generators from Python:
def gen(*items):
for x in items:
if x > 5:
yield x
for y in gen(1,2,3,4,5,6,7,8,9):
print(y)
Should print:
6
7
8
9
Does this new RFC support that kind of usage? I guess I'm not clear enough on how Futures work to figure it out myself.
- ekimekim 9y agoPart of the RFC is the intent to use these to create iterators, so yes I believe that kind of usage would be covered.