Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implemented generators throughout entire library. Need to inspect mor…
…e carefully for missing opportunities to use generators as well as test to insure that everywhere a generator is expected it is returned. Additionally that everywhere a generator is expected to be evaluated and its result stored, that is happening
- Loading branch information
df8269a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another note: in
flatten()
,return chain.from_iterable(self.sequence)
is a bit faster:Top one is
self.flat_map(lambda x: x)
, bottom ischain.from_iterable(self.sequence)
edit: oh wait, it doesn't pass tests
for some reasonitertools.chain
generator is not properly expanded, I guess