ZVON > References > Haskell reference
| 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

Example 1
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)




_____________________________________________
Reference Search | Sitemap | XML Glossary       ZVON | Systinet




Related sites:
  • dotNet Slackers - Your latest resource for ASP.NET
  • Dotnet Spider - Outsourcing and Offshore software development in India
  • XML - Xselerator, XSL Editor, BizTalk Utilities, XML Tutorials, Learn XML
  • Planet Source Code - The largest public source code database on the Internet
Domain Names conference call service UNLIMITED Web Hosting by HostDepartment Alojamiento Web answering service
MSN VoIP Internettelefonie Hosted Exchange, SDSL VoIP Internettelefonie AT VoIP Internettelefonie DE