Iterator pattern is a design pattern in which an iterator is used to traverse a container and access the container's elements. The iterator pattern decouples algorithms from containers; in some cases, algorithms are necessarily container-specific and thus cannot be decoupled.
ie. Lets you iterate over a collection of items without exposing its underlying representation.
Language | Description | Status | Code Examples |
---|---|---|---|
Golang(Go) | Simple Example | ✅ | main.go |
Python | ❌ |