Peter Landin's J operator
Encyclopedia
In computer science
Computer science
Computer science or computing science is the study of the theoretical foundations of information and computation and of practical techniques for their implementation and application in computer systems...

, Peter Landin's J operator is a programming construct that post-composes a lambda expression
Lambda expression
Lambda expression may refer to:*Anonymous function*Lambda calculus#Definition...

 with the continuation
Continuation
In computer science and programming, a continuation is an abstract representation of the control state of a computer program. A continuation reifies the program control state, i.e...

 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
Return statement
In computer programming, a return statement causes execution to leave the current subroutine and resume at the point in the code immediately after where the subroutine was called, known as its return address. The return address is saved, usually on the process's call stack, as part of the operation...

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.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK