-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
call/cc give error #5
Comments
Thanks for reporting this! There's (apparantly) a bug in (call/cc (lambda (return)
(let ((n 5)
(result (list))
(k #f))
(set! result (append result (list (call/cc (lambda (return)
(set! k return)
"Hello")))))
(when #t
(if (zero? n)
(return result))
(set! n (- n 1))
(k (string-append "Hello <" (number->string n 10) ">")))))) Then it works as expected |
Nice, awesome project. You should also try to test quasiquote and syntax-rules, check the links, it took a while to create those tests. |
If you want to run the code from unit tests without Ava and by helper code, you will need to write mocks for Ava testing framework, I think that you only need those:
|
This is an example that helped me find an error in BiwaScheme and its call/cc implementation biwascheme/biwascheme#257. Here is the code. You can use it to test your implementation:
It should return:
All elements are implemented but git weird:
The text was updated successfully, but these errors were encountered: