Memento is a behavioral design pattern that lets you save and restore the previous state of an object without revealing the details of its implementation. source
In this example History holds a collection of Snapshot to restore previous states of Editor.