[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "Typo" in Haskell 98 Random library
Thu, 3 Feb 2000 11:26:26 +1300 (NZD), Tom Pledger <Tom.Pledger@peace.com> pisze:
> class RandomGen g where
> mkGen :: Int -> g
> next :: g -> (Int, g)
> split :: g -> (g, g)
> split g = (mkGen seed, g') where (seed, g') = next g
It means that the original generator is no longer usable after
splitting (I generate one more number from it and then get the same
sequence as from a splitted one). I don't know if I could assume
otherwise. Maybe not, but then IMHO it should be written explicitly
in the Report to not use the original after splitting.
--
__("< Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/
\__/ GCS/M d- s+:-- a22 C+++$ UL++>++++$ P+++ L++>++++$ E-
^^ W++ N+++ o? K? w(---) O? M- V? PS-- PE++ Y? PGP+ t
QRCZAK 5? X- R tv-- b+>++ DI D- G+ e>++++ h! r--%>++ y-