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

Can ntimes be tail recursive? #65

Open
Dretch opened this issue Feb 22, 2018 · 0 comments
Open

Can ntimes be tail recursive? #65

Dretch opened this issue Feb 22, 2018 · 0 comments

Comments

@Dretch
Copy link

Dretch commented Feb 22, 2018

Right now ntimes (https://github.com/ziman/lightyear/blob/master/Lightyear/Combinators.idr#L50) is not tail recursive, so it causes a stack overflow with large input.

Can this be made tail-recursive to avoid the problem?

Other combinators could also be changed - many, sepBy1, etc.

If this feature is desired I can put together a pull request?

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