
10 Apr
2015
10 Apr
'15
8:51 a.m.
Hello,
Streams of random data is actually somewhat popular structure, and has been asked about before. What was also found out that such lazy streams are fraught with problems. Some are described on this page:
http://okmij.org/ftp/continuations/PPYield/index.html#randoms The page also shows two solutions, which are robust and easy to reason about.
And from that page:
The monadic stream ListM is not a Haskell list. We have to write our own ListM-processing functions like headL, replicateL, appendL, etc. (There is probably a Hackage package for it.)
Could it be Pipes? Best regards, Marcin Mrotek