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

Make "list" from the Random library use loops #185

Closed
TheSeamau5 opened this Issue Mar 2, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@TheSeamau5
Contributor

TheSeamau5 commented Mar 2, 2015

I opened an issue on elm-random-extra: TheSeamau5/elm-random-extra#1

where I spotted that I'm unable to generate lists larger that 3999 elements long (at least on my computer: macbook pro from 2011).

This is due to how list is implemented. It's a recursive definition. This issue goes towards the larger goal of solving tail recursion in Elm, but I wanted to point out this example as I have found it.

@jvoigtlaender

This comment has been minimized.

Show comment
Hide comment
@jvoigtlaender

jvoigtlaender Jul 8, 2016

Contributor

In the current version of core, Random.list is implemented in tail recursive fashion. And the current compiler version optimizes tail recursion. So this should not be an issue anymore.

Contributor

jvoigtlaender commented Jul 8, 2016

In the current version of core, Random.list is implemented in tail recursive fashion. And the current compiler version optimizes tail recursion. So this should not be an issue anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment