An open API service providing repository metadata for many open source software ecosystems.

Package Usage: hackage: random

This package provides basic pseudo-random number generation, including the ability to split random number generators. In pure code, use System.Random.uniform and System.Random.uniformR from System.Random to generate pseudo-random numbers with a pure pseudo-random number generator like System.Random.StdGen. As an example, here is how you can simulate rolls of a six-sided die using System.Random.uniformR: See System.Random for more details. In monadic code, use System.Random.Stateful.uniformM and System.Random.Stateful.uniformRM from System.Random.Stateful to generate pseudo-random numbers with a monadic pseudo-random number generator, or using a monadic adapter. As an example, here is how you can simulate rolls of a six-sided die using System.Random.Stateful.uniformRM: The monadic adapter System.Random.Stateful.runStateGen_ is used here to lift the pure pseudo-random number generator pureGen into the System.Random.Stateful.StatefulGen context. The monadic interface can also be used with existing monadic pseudo-random number generators. In this example, we use the one provided in the mwc-random package: See System.Random.Stateful for more details.
12 versions
Latest release: over 3 years ago
283 dependent packages
434,555 downloads total

View more package details: https://packages.ecosystem.code.gouv.fr/registries/hackage.haskell.org/packages/random

Dependent Repos 4

Ganil-acq/Embedded/REActif/REAssemble/zguide

Last synced: 7 months ago - Pushed: 11 months ago

Renater/pandoc Fork of jgm/pandoc
Universal markup converter

Size: 33.7 MB - Last synced: 5 days ago - Pushed: over 6 years ago