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

RangeError Maximum call stack size exceeded #4

Open
milahu opened this issue Sep 2, 2023 · 0 comments
Open

RangeError Maximum call stack size exceeded #4

milahu opened this issue Sep 2, 2023 · 0 comments

Comments

@milahu
Copy link
Owner

milahu commented Sep 2, 2023

currently, this demo code throws FIXME unhandled error: RangeError Maximum call stack size exceeded

# Fibonacci 9999: Maximum call stack size exceeded
let f = i: n: m: if i == 0 then n
    else f (i - 1) m (n + m);
  fib = n: f n 1 1;
in fib 9999

todo: use trampoline and lazy functions as described in Are functions in JavaScript tail-call optimized?

related: #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant