283
edits
KalmanKeri (talk | contribs) No edit summary |
KalmanKeri (talk | contribs) |
||
Line 15: | Line 15: | ||
\def\rew{\mathrel{\Rightarrow}\,} | \def\rew{\mathrel{\Rightarrow}\,} | ||
</math> | </math> | ||
<math>\mathsf{let}</math> is a popular construct in functional languages that declares a lexically scoped local variable. It's usual form is <math>\mathsf{let}~x = | <math>\mathsf{let}</math> is a popular construct in functional languages that declares a lexically scoped local variable. It's usual form is <math>\mathsf{let}~x = s~\mathsf{in}~t</math> which denotes binding the name <math>x</math> to the term <math>s</math> in the term <math>t</math>. | ||
In lambda calculus <math>\mathsf{let}</math> can be encoded as <math>(\lambda x . | In lambda calculus <math>\mathsf{let}</math> can be encoded as <math>(\lambda x . t)~s</math>. Applying the ''<math>\beta</math>-rule'' we get <math>t[s/x]</math>, an instance of <math>t</math> where <math>s</math> is substituted for every free occurence of <math>x</math>. | ||
In pipe-calculus we can do similar encoding. | In pipe-calculus we can do similar encoding. | ||
edits