10 ms·
The vast majority of programming languages return an iterator when you use map, filter, etc. There is usually only one eager evaluation pass at the end that con
by imtringued 9y ago
The vast majority of programming languages return an iterator when you use map, filter, etc. There is usually only one eager evaluation pass at the end that conerts the iterator to a list.
Most languages are capabale of inlining the "next" function of the iterator to generate almost the same code as a regular for loop.