Closed rtfeldman closed 9 years ago
Oh, quick tip, if you want a random generator that always generates the same value, there's constant
.
http://package.elm-lang.org/packages/TheSeamau5/elm-random-extra/2.1.0/Random-Extra#constant
You don't need to say, Random.float 0 0
you can just do Random.constant 0
Ah! Good to know. I figured there was something like that, but didn't know what it was called. Changed to constant
in c69d079a0df116d9adf9601afd4a7dbfd2f5824f
Cool, thanks. This is a pretty useful investigator.
Nice, thanks! :grinning:
I wanted one of these so I could generate an Array and then select an element from within it at random. Seems more broadly applicable than that, of course. :smiley: