A programming style where functions never return values directly, but instead pass their results to continuation functions provided as arguments. Control flow becomes explicit through function calls rather than implicit returns.
Developed from lambda calculus and formal semantics in the 1970s, where 'continuation' represents 'what happens next' in a computation. The style was formalized by computer scientists studying program transformation and compiler optimization, making control flow manipulation explicit and uniform.
CPS is like having a relay race where instead of runners returning to you with the baton, each runner passes it directly to the next runner you specify! This turns your entire program inside-out - instead of calling functions and waiting for results, you tell each function exactly who to give its result to, making complex control flow like exceptions and coroutines much easier to implement.
Complete word intelligence in one call. Free tier — 50 lookups/day.