Python iterators

This series compares Python iterators to Haskell’s list datatype, taking a deep dive into the itertools library and the corresponding functions in the Haskell standard library.

A Python iterator is a sort of sequence that, unlike a list, computes each subsequent value only as it is needed rather than computing the entire list all at once. In simple cases, Haskell’s list type ([]) fulfills a similar role. In some more complex situations, we may use a “streaming” library like pipes.

The next lessons go through all of the Python functions that return iterators. If you’re familiar with the itertools module, these lessons will get you started quickly with Haskell’s Data.List module:

Join Type Classes for courses and projects to get you started and make you an expert in FP with Haskell.