codesnippets:randomvalues
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| codesnippets:randomvalues [2021/04/30 20:37] โ f2b216 | codesnippets:randomvalues [2025/10/08 00:48] (current) โ external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Random values ====== | ====== Random values ====== | ||
| - | ~~DISCUSSION~~ | ||
| * example | * example | ||
| Line 11: | Line 10: | ||
| main = do | main = do | ||
| prng0 <- Rnd.newStdGen | prng0 <- Rnd.newStdGen | ||
| - | print $ processMyData ((Rnd.random prng0) :: MyData) | ||
| print $ processMyData ((Rnd.random prng0) :: MyData) | print $ processMyData ((Rnd.random prng0) :: MyData) | ||
| Line 253: | Line 251: | ||
| in | in | ||
| (prng1, prng2, prng3, prng4, prng5, prng6, prng7, prng8, prng9) | (prng1, prng2, prng3, prng4, prng5, prng6, prng7, prng8, prng9) | ||
| + | </ | ||
| + | * executes, with output like:< | ||
| + | (MyData 1547211741 2147483396 0.2483644234579585 0.9836217202419262 (MyData2 0.4909809627910673 0.8713231916723704), | ||
| </ | </ | ||
| + | |||
| + | ===== โ ===== | ||
| + | ~~DISCUSSION~~ | ||
codesnippets/randomvalues.1619807864.txt.gz ยท Last modified: (external edit)
