3 ms·
Yes it does. If you did want a generator that didn't yield anything I guess you could write: myEmptyGen = -> yield if false Which is pretty ugly, b
by almost 13y ago
Yes it does.
If you did want a generator that didn't yield anything I guess you could write:
myEmptyGen = ->
yield if false
Which is pretty ugly, but it's not something I've needed to do often with generators (in Python at least)