Talk:Essays/Combinators

From J Wiki
Jump to navigation Jump to search

This page may be used as a staging area for content intended for the main page

lambda

Treatments of combinator calculus often involve examples which use lambda calculus.

Here, lambda basically means a {{ sentence in terms of y }}ing expression.

However, lambdas have "syntactic scope". In other words, they carry a reference to the evaluation context where they were defined. J does not do this - instead, when translating lambda expressions to J, you must explicitly pass referenced value into the lambda as arguments.

In other words, implement the effect of inner lambdas in J, our inner lambdas take additional arguments. (And, in this context, our life was made easier by the observation that combinator calculus never mutates any arguments.)