We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Seed -> (a, Seed)
In Random we have:
type Generator a = Generator (Seed -> (a, Seed))
So if I have a way of doing Seed -> (a, Seed)), I should be able to make a Generator a. Well not exactly.
Seed -> (a, Seed))
Generator a
I can do:
fromStep : (Seed -> ( a, Seed )) -> Generator a fromStep step = Random.independentSeed |> Random.map (step >> Tuple.first)
The problem here is independantSeed goes through the extra work of creating a new seed, and then we throw out the seed after the generator is used.
independantSeed
There’s no way to use a seed and step, (generating a value) and returning the value and the next seed.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In Random we have:
So if I have a way of doing
Seed -> (a, Seed))
, I should be able to make aGenerator a
.Well not exactly.
I can do:
The problem here is
independantSeed
goes through the extra work of creating a new seed, and then we throw out the seed after the generator is used.There’s no way to use a seed and step, (generating a value) and returning the value and the next seed.
The text was updated successfully, but these errors were encountered: