diff --git a/example.vli b/example.vli index ca94781..e98ca98 100644 --- a/example.vli +++ b/example.vli @@ -1,9 +1,12 @@ ;; Check that lambdas can be passed as arguments -((lambda (f y) (f y)) - (lambda (x) (* x x)) +((fn (f y) (f y)) + (fn (x) (* x x)) 2) -(((lambda (x) - (lambda () (* x x 2))) +(((fn (x) + (fn () (* x x 2))) 2)) + + +(fn foo (x y) (* x y)) diff --git a/src/common.hpp b/src/common.hpp index b19ba0b..d4efe0c 100644 --- a/src/common.hpp +++ b/src/common.hpp @@ -554,7 +554,7 @@ class Symbol : public Object { uint64_t i = 0; uint64_t j = 0; while (1) { - if (i == lsize && j == lsize) return 0; + if (i == lsize && j == rsize) return 0; short cmp = short(i == lsize) - short(j == rsize); if (cmp != 0) return cmp;