contents the iterator pattern why we use iterators iterators in python fibonacci iterator getting the iterator filtered iterators the iterator generator fibonacci iterator generators in classes consequences of the iterator pattern programs on github the mediator pattern an example system interactions between controls sample code mediators and command objects consequences of the mediator pattern single interface mediators programs on github the memento pattern when to use memento sample code consequences of the memento pattern programs on github the observer pattern example program for watching colors change the message to the media consequences of the observer pattern programs on github the state pattern sample code switching between states how the mediator interacts with the statemanager consequences of the state pattern