Skip to content
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

[wasm] bus error #5

Open
PikachuHy opened this issue Apr 2, 2023 · 3 comments
Open

[wasm] bus error #5

PikachuHy opened this issue Apr 2, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@PikachuHy
Copy link
Owner

(letrec ((even?
          (lambda (n)
            (if (zero? n)
                #t
                (odd? (- n 1)))))
         (odd?
          (lambda (n)
            (if (zero? n)
                #f
                (even? (- n 1))))))
  (even? 14))

run success

(letrec ((even?
          (lambda (n)
            (if (zero? n)
                #t
                (odd? (- n 1)))))
         (odd?
          (lambda (n)
            (if (zero? n)
                #f
                (even? (- n 1))))))
  (even? 15))

run fail with bus error

[1]    17930 bus error  node r4rs_test.js
@PikachuHy PikachuHy added the bug Something isn't working label Apr 2, 2023
@PikachuHy
Copy link
Owner Author

run success

(letrec ((fib (lambda (n)
            (cond ((zero? n) 1)
                  ((= 1 n) 1)
                  (else  (+ (fib (- n 1))
			    (fib (- n 2))))))))
    (fib 9))

run fail

(letrec ((fib (lambda (n)
            (cond ((zero? n) 1)
                  ((= 1 n) 1)
                  (else  (+ (fib (- n 1))
			    (fib (- n 2))))))))
    (fib 10))

@PikachuHy
Copy link
Owner Author

`(a `(b ,(+ 1 2) ,(foo ,(+ 1 3) d) e) f)

@PikachuHy
Copy link
Owner Author

    (let ((name1 'x)
          (name2 'y))
      `(a `(b ,,name1 ,',name2 d) e))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant