Make function-declaration example compile and work
This commit is contained in:
parent
7a36787bd8
commit
8f6ebf2d0e
2 changed files with 8 additions and 5 deletions
11
example.vli
11
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))
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue