Closed Idorobots closed 1 week ago
Result when running just letrec conversion:
letrec conversion
- converts more complex recursive functions correctly - !!!FAILURE!!! (run (quote (letrec ((lazy-23 (cons 23 (lambda () lazy-23))) (lazy-take (lambda (list n) (if (zero? n) (quote ()) (cons (car list) (lazy-take ((cdr list)) (- n 1)))))) (bar (lazy-take lazy-23 5))) bar))) did not satisfy #<procedure:equal?> expected: (23 23 23 23 23) received: #(struct:resumable #(struct:closure () #<procedure>) (23 23 23 23 23))
The test case passes when run with another test case that runs some code (for instance Recursion). Likely due to the continuation short-circuiting optimization.
Recursion
Result when running just
letrec conversion
:The test case passes when run with another test case that runs some code (for instance
Recursion
). Likely due to the continuation short-circuiting optimization.