glennj
1
https://github.com/exercism/elm/blob/cee7a8847a3bca4a9420cf7f962223d95793eb41/concepts/random/introduction.md?plain=1#L59
generate 5 (Random.weighted (Red, 80) [(Green, 15), (Blue, 5)])
But should be
generate 5 (Random.weighted (80, Red) [(15, Green), (5, Blue)])
Docs:
weighted : ( Float, a ) -> List ( Float, a ) -> Generator a
https://package.elm-lang.org/packages/elm/random/latest/Random#weighted
Can I offer a PR?
1 Like
I haven’t got time to look at the code right now, but you sound confident, so please go ahead!
Or, If you’re happy to wait I can take a longer look in a few days time.
Cheers, cedd
glennj
3
Thanks Glenn, I’ve merged that :)