powerful feature of python is its iterator protocol (which we will get to shortlythis capability is only loosely connected to functional programming per sesince python does not quite offer lazy data structures in the sense of language like haskell howeveruse of the iterator protocol--and python' many built-in or standard library iteratables--accomplish much the same effect as an actual lazy data structure let us explain the contrast here in slightly more detail in language like haskellwhich is inherently lazily evaluatedwe might define list of all the prime numbers in manner like the following-define list of all the prime numbers primes sieve [ where sieve ( :xsp sieve [ <xs( `remp)/= this report is not the place to try to teach haskellbut you can see comprehension in therewhich is in fact the model that python used in introducing its own comprehensions there is also deep recursion involvedwhich is not going to work in python apart from syntactic differencesor even the ability to recurse to indefinite depththe significant difference here is that the haskell version of primes is an actual (infinitesequencenot just an object capable of sequentially producing elements (as was the primes object we demonstrated in the entitled "callables"in particularyou can index into an arbitrary element of the infinite list of primes in haskelland the intermediate values will be produced internally as needed based on the syntactic construction of the list itself