tweak lambda evaluator
authorJim Pryor <profjim@jimpryor.net>
Thu, 23 Sep 2010 08:49:51 +0000 (04:49 -0400)
committerJim Pryor <profjim@jimpryor.net>
Thu, 23 Sep 2010 08:49:51 +0000 (04:49 -0400)
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
code/parse.js

index 382ba02..6882d79 100644 (file)
@@ -176,7 +176,11 @@ var make_parse = function () {
                                res = make_lam2(s, z, res);
                                number_table[this.value] = res;
                        }
-                       return res;
+                       if (this.first) {
+                               return make_app(this.first.handler(), res);
+                       } else {
+                               return res;
+                       }
                }
 
                var constant = function (s, v) {