
Thunk
A thunk is a small piece of code used in programming that delays executing a function until it's specifically needed. Think of it as a "promise" to do something later, rather than doing it immediately. This allows programs to manage resources more efficiently, avoid unnecessary calculations, or handle asynchronous tasks. Thunks are commonly used in functional programming and in managing side effects in software, ensuring that operations are performed only when necessary, which can improve performance and control flow.