# Command: An Action You Can Hold

When the dispatcher's plan for the morning is stored as rows of text and run by a switch on each action's name, every new kind of action means editing the runner; the Command pattern turns "Assign package 42 to Dana" into an object that can be stored, queued, logged and run later.

![Cheat sheet: Command: An Action You Can Hold](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/8c6a60a793ae41f485c89ed7fe2bba10.webp)

- Category: Data Structures
- Level: Journeyman
- Tags: Code Smell, Command Pattern, Higher-Order Function, OOP
- Author: Gregor Dzierzon
- Updated: November 17, 2026

Source: https://www.ask-codey.com/cheat-sheets/dp-command-cheat-sheet
