ZVON > References > Haskell reference |
Intro / Search / ZVON |
| Indexes | Syntax | Prelude | Ratio | Complex | Numeric | Ix | Array | List | Maybe | Char | Monad | IO | Directory | System | Time | Locale | CPUTime | >> Random << |
Module: | Random |
---|---|
Function: | newStdGen |
Type: | IO StdGen |
Description: | applies split to the current global random generator, updates it with one of the results, and returns the other |
Related: | getStdGen, mkStdGen, setStdGen |
Program source: import Random main = do x <- getStdGen print (next x) newStdGen x <- getStdGen print (next x) newStdGen x <- getStdGen print (next x)
Output: (213125916,539435064 326309148)
Output: (257480679,539475078 281994399)
Output: (1774715403,539515092 912283251)