Easy way to make an iterator from a generator (in 6 lines) and when it’s useful

Standard

Ok here is an easy way to make an iterator from a generator (btw googled this question and couldn’t find it so I thought I’d share). First though some motivation for the problem: * Why do I want iterators/generators, why not use lists? – because I can process data that is too big for memory.

read full details at http://ift.tt/1RxHY53

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s