Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upEliminate a superfluous List.reverse call in Random.list #575
Conversation
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
|
Added to #724 |
evancz
closed this
Sep 22, 2016
jvoigtlaender
deleted the
jvoigtlaender:random-reverse
branch
Sep 22, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jvoigtlaender commentedApr 28, 2016
Replaces https://github.com/elm-lang/core/pull/522, which became collateral damage in the branch killing spree.
Why remove that
List.reversecall? Without it, generation is more efficient. And its presence or absence doesn't carry meaning for the semantics of randomness.An argument has been made in the other discussion that with that call one has some sort of stability. But I have pointed out that it's a very fragile stability, and might even be harmful in terms of raising expectations, and in any case isn't compositional.
In this:
the outputs are
([2,22],True,[50,42])vs.([2,22,89,50,42],False,[47,79,82,79,6]). So only an appearance of stability.