Peter Landin's J operator is a programming construct that post-composes a lambda expression with the continuation to the current lambda-context. The resulting “function” is first-class and can be passed on to subsequent functions, where if applied it will return its result to the continuation of the function in which it was created.
Generalized first-class return
One can define the return statement as a first-class object by taking the J of the identity function. It can then be passed on to other functions and applied there to return from the function in which the “return” was created.
See also
References
- Thielecke, Hayo. An Introduction to Landin’s “A Generalization of Jumps and Labels”, Higher-Order and Symbolic Computation, 11(2):117-123, 1998.
- Danvy, Olivier and Millikin, Kevin. A Rational Deconstruction of Landin's SECD Machine with the J Operator, Logical Methods in Computer Science, Volume 4, Issue 4, Paper 12, 2008.
- Danvy, Olivier, Chung-Chieh Shan and Ian Zerny. J is for Javascript: A direct-style correspondence between Algol-like languages and JavaScript using first-class continuations.
| This programming language-related article is a stub. You can help Wikipedia by expanding it. |
This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)




