- The title of this article is incorrect because of technical limitations. The correct title is call/cc.
- This article is a stub, which means that it is not detailed enough and needs to be expanded. Please help us by .
call/cc is pretty much the strangest language construct ever invented. It's common in LISP-like languages and is incredibly difficult to understand.
An attempt to put it in English (by someone who doesn't understand it)
call/cc takes a single function- f- as its argument. f takes a single argument- another function, called c- as its argument. call/cc calls f with a special function as an argument called the "current continuation". When the current continuation- basically, a single-argument function- is called with a value v, it resets the state-of-control to when the original call/cc was called and forces it to return the argument it was applied to. Phew!
Usage in Esolangs
call/cc basically makes any language that uses it an honorary esolang. However, this section will only cover intentional esolangs.