Sure, I just copied the function definition to my module that uses
Random.Pcg instead of Random.
There was no need to change the implementation, it just uses
Random.Pcg.constant instead of Random.Extra.constant, I believe.
import Random.Pcg as Random exposing (Generator)
{-| Turn a list of generators into a generator of lists.
This is a version working with Random.Pcg.
-}
together : List (Generator a) -> Generator (List a)
together generators =
case generators of
[] ->
Random.constant []
g :: gs ->
Random.map2 (::) g (together gs)
On Friday, August 19, 2016 at 4:24:07 PM UTC+2, Max Goldstein wrote:
>
> > I have created my own Random.Pcg `together` and it compiles.
>
> Would you mind clarifying what you mean by this?
>
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.