Home Menu
Pipelines Pattern Matching
Learning Pattern Matching Pattern Matching Example
Add Pattern Recursion Data Types
Syntax Binary Trees
Iterators
First exposure Iterator chaining Iterator slicing Lazy Evaluation
Lazy Lists
In Python In Coconut
Recursive Factorial
Base Case Recursive Call Error Handling Wildcard Pattern Automatic Tail Call Optimization


Iterators: Introduction

This section of tutorial will be focused on iterators. If you are unfamiliar with iterators in Python, you might find it helpful to read through the Python tutorial on iterators and generators, which you can find here. This tutorial also references the Python itertools module, the documentation for which can be found here.

Python's iterator functionality can be complex and a bit difficult to use. A good chunk of it comes from itertools, which is a module that implements several iterator building blocks inspired by functional programming languages from Haskell and APL. Coconut simplifies many of these features and treats them as built-ins rather than add-ons, making using iterators easier and more effective.


Next
Previous