<div dir="ltr">Hi Brent and Wouter,<br><br>looking at SO questions<br><br><a href="http://stackoverflow.com/q/14494648/1333025">http://stackoverflow.com/q/14494648/1333025</a><br><a href="http://codereview.stackexchange.com/q/52149/15600">http://codereview.stackexchange.com/q/52149/15600</a><br>

<br>threre are monads and applicative functors that support<br><br>```<br>sequenceInf :: S.Stream (f a) -> f (S.Stream a)<br>```<br><br>that is, allow lazy traversals of streams (infinite lists). Namely those that don't produce any additional output.<br>

<br>And instances of MonadRandom seem to have valid implementations of `sequenceInf`, which would allow to produce lazy infinite randomized lists (basically a generalization of `getRandoms`).<br><br>My proposal is to add<br>

<br>```<br>class Applicative f => LazyApplicative f where<br>    sequenceInf :: S.Stream (f a) -> f (S.Stream a)<br>    sequenceInf = traverseInf id<br><br>    traverseInf :: (a -> f b) -> S.Stream a -> f (S.Stream b)<br>

    traverseInf f = sequenceInf . S.map f<br>```<br><br>to a module in Stream package (for example `Control.Applicative.Lazy`), and add its instances into `MonadRandom`.<br><br>What do you think? I'd be willing to send patches.<br>

<br>  Best regards,<br>  Petr<br></div>