Dave Tweed wrote:
> On Fri, 4 Dec 1998, Keith Wansbrough wrote:
>
> > Surely it would be better to split the one stream into several infinite ones:
> > - - -
>
> Closer inspection reveals this is not a necessarily a the best idea
> (particularly if you're going to repeat the trick several times
> There was a paper
> published in the JFP about a better way of splitting streams which I think
> appeared sometime between January 1996--October 1996.
Are you perhaps referring to the paper by me, Mikael Rittri, and Dan Synek
called "On generating unique names" (Jan 94). It has a low level tri
On Fri, 4 Dec 1998, Lennart Augustsson wrote:
>
> > There was a paper
> > published in the JFP about a better way of splitting streams which I think
> > appeared sometime between January 1996--October 1996.
> Are you perhaps referring to the paper by me, Mikael Rittri, and Dan Synek
> called "On
Keith Wansbrough wrote:
> Surely it would be better to split the one stream into several infinite ones:
>
> splitStream :: [a] -> ([a],[a])
>
> splitStream xs = unzip (spl xs)
> where spl (x:y:xs) = (x,y):(spl xs)
>
> Then you don't have to know how many you are going to use from each s
On Fri, 4 Dec 1998, Keith Wansbrough wrote:
> Surely it would be better to split the one stream into several infinite ones:
>
> splitStream :: [a] -> ([a],[a])
>
> splitStream xs = unzip (spl xs)
> where spl (x:y:xs) = (x,y):(spl xs)
>
> Then you don't have to know how many you are goi
| The discussion of random numbers in Haskell should perhaps
| move elsewhere as it is quite restricted, but it shows one
| problem with the functional approach to *practical* programming:
| in *my opinion* our fascination by the Monadic Approach to
| Universe and Everything, and the possibility
> Lennart advocates the use of streams :
>
> > let mis = take n (random ss1)
> > is = take n (toInt (random ss2))
> > ds = take n (toDouble (random ss3))
> > in ...
>
> and I agree entirely with him, although the coding details might
> be different. Streams are nice and safe.
The discussion of random numbers in Haskell should perhaps
move elsewhere as it is quite restricted, but it shows one
problem with the functional approach to *practical* programming:
in *my opinion* our fascination by the Monadic Approach to
Universe and Everything, and the possibility to program