Oftentimes when programming, we end up with some gnarly, tangled, hard-to-reason-about conditional logic full of if-statements that deal with some internal state. What if there was a different way to tackle the problem, a design pattern that made it easier to reason about the logic?
Code is a language used to plan things. In SICP this is called "design by wishful thinking". In other places, this is referred to as "top-down" design.
You start by pretending that you have a library of functions that do exactly what you want. You then write your program using those functions, and then go back and fill in the details afterwards. https://www.youtube.com/watch?v=amf5lTZ0UTc&t=3501s