ELI5: Explain Like I'm 5

Continuation-passing style

Continuation-Passing Style (CPS) is a way of writing computer programs. It is different from the normal way of writing programs, which is called "traditional style". In traditional style, when you want your program to do something, you tell it exactly what to do step by step. With CPS, when you want the program to do something, you give it the instructions for what to do, but you also tell it what to do after it does the first thing. That way, your program can keep doing things without you having to give it every step it needs to do, one at a time. It's like when you are playing a game, and you give someone a set of instructions that show them how to get to the end. You don't have to keep telling them what to do the whole way, you just give them the instructions for how to get to the end, and then they can keep going using the instructions you gave them. CPS is like that.
Related topics others have asked about: