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

Question: has TCO been implemented? #950

Closed
SekibOmazic opened this issue Mar 5, 2015 · 3 comments
Closed

Question: has TCO been implemented? #950

SekibOmazic opened this issue Mar 5, 2015 · 3 comments
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@SekibOmazic
Copy link

Hi,

I'm not sure if the tail call optimisation has been fully implemented or not, but when running this code in repl:

const even = (n) => n === 0 || (n !== 1 && even(n - 2))

console.log(even(100042));

I get following message:

Maximum call stack size exceeded
@sebmck
Copy link
Contributor

sebmck commented Mar 5, 2015

Hey @SekibOmazic! The Babel issue tracker is exclusively for bugs and features requests for Babel, for questions and support you can try our gitter room and StackOverflow, thanks!

@sebmck sebmck closed this as completed Mar 5, 2015
@SekibOmazic
Copy link
Author

@sebmck Well no need to go to http://stackoverflow.com and ask the question. It's enough to put the code above in the REPL to get the stack overlow ;-)

@ericelliott
Copy link

The problem seems to be that tail calls don't work with anonymous functions.

@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jul 20, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests

3 participants