(no commit message)
[lambda.git] / lambda-let.html
index 5bb3ac5..c5e1a64 100644 (file)
@@ -1,11 +1,12 @@
 <html>
 <head>
-<title>Lambda tutorial</title>
-<script language=JavaScript src="lambda.js"></script>
+<title>Lambda evaluator with lets</title>
+<script language=JavaScript src="code/lambda.js"></script>
 </head>
 <body>
 
-instance, try clicking on the "Reduce" button: <center><form> 
+
+Try clicking on the "Reduce" button: <center><form> 
 <textarea cols="80" rows="20" name=input>
 let true = (\x (\y x)) in
 let false = (\x (\y y)) in
@@ -25,8 +26,17 @@ let and = (\l (\r ((l r) false))) in
 
 </textarea>
 <br>
-<input type=button value="Reduce" onClick="mytry(this.form)"> <input
-type=Label name=result size=50> </form> </center> You should see the
+<input type=button value="Reduce" onClick="mytry(this.form)"> 
+<br>
+<textarea cols="80" rows="10" name=result></textarea>
+</form> </center> 
+
+<p>
+Notes: you have to fully specify parentheses and separate your lambdas. So for example, you can't write `(\x y. y)`; you have to write `(\x (\y y))`.
+<p>
+The parser treats symbols that haven't yet been bound (as `yes` and `no` in the example above) as free variables.
+<p>
+If you try to evaluate a non-terminating form, like `((\x (x x)) (\x (x x)))`, you'll probably have to force-quit your browser and start over. Anything you had earlier typed in the upper box will probably be lost.
 
 </body>
 </html>