pub fn command_exercise() -> Result<(), String>
Expand description

Example of using the “Command” pattern.

The Command pattern is used to encapsulate an operation or command associated with an object so that the command can be applied to the object at a later time.

In this exercise, an undo list is implemented using Commands that associate commands defined in this file with a text object. The commands are applied to the text object in succession then effectively undone.