X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=lambda_evaluator.mdwn;h=a696537de5d30fcb7119588187fb1d67eb3de513;hp=7228fca7a6081714c2d874b53db032ff00f6be06;hb=8a17989a3112b0bdecfaaf7855f6b41f8f033476;hpb=8dd323ab2d93d590e51cfe30de3cb89d2840f175 diff --git a/lambda_evaluator.mdwn b/lambda_evaluator.mdwn index 7228fca7..a696537d 100644 --- a/lambda_evaluator.mdwn +++ b/lambda_evaluator.mdwn @@ -8,7 +8,7 @@ It will allow you to write lambda terms and evaluate them, with full ability to *Lambda terms*: lambda terms are written with a backslash, thus: `((\x (\y x)) z)`. If you click "Reduce", the system will produce a lambda term that is guaranteed to be reduction equivalent (`<~~>`) with the original term. So `((\x (\y x)) z)` reduces to (a lambda term equivalent to) `(\y z)`. -*Let*: in order to make building a more elaborate system easier, it is possible to define values using `let`. +*Let*: in order to make building a more elaborate set of terms easier, it is possible to define values using `let`. In this toy system, `let`s should only be used at the beginning of a file. If we have, for intance, let true = (\x (\y x)) in @@ -16,7 +16,7 @@ In this toy system, `let`s should only be used at the beginning of a file. If w ((true yes) no) the result is `yes`. Things to watch out for: the expression after the equal sign must have balanced parentheses, -and the "in" is obligatory. The system will still produce a result, but it won't make much sense. +and the "in" is obligatory. If you violate these rules, the system will still produce a result, but it won't make much sense. *Abbreviations*, **NOT**: No abbreviations work. So `\xy.yxx` must be written `(\x (\y ((y x) x)))`. (As in Scheme or Racket.)