On Monday, November 13, 2017 at 5:49:32 PM UTC, art yerkes wrote: > > 'iterate' is the right way to do what you're looking for. No idea why > they chose to expose that. > > generate : Generator a -> Seed -> LazyList a > generate generator seed = > let start = Random.step generator seed in > LL.iterate > (\(v,s) -> Random.step generator s) > start > |> LL.map Tuple.first >
Yes, this is the same code as I posted originally (generate2). It just seemed overkill to have to apply a 'map first' when it can be accomplished in a single pass using the Cons constructor. -- 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 elm-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.