random-variates-0.1.4.0: "Uniform RNG => Non-Uniform RNGs"

Safe HaskellSafe
LanguageHaskell2010

Stochastic.Generator

Documentation

type Gen g a = g -> (a, g) Source

data IOGen g a Source

Constructors

IOGen (g -> (a, g)) (MVar g) 

liftGen :: (g -> (a, g)) -> g -> IO (IOGen g a) Source

nextIO :: IOGen g a -> IO a Source

foldGenWhile :: (g -> (a, g)) -> (b -> a -> b) -> b -> (b -> Bool) -> g -> ([a], g) Source

genWhile :: (g -> (a, g)) -> (a -> Bool) -> g -> ([a], g) Source

genTake :: (Eq b, Num b) => (g -> (a, g)) -> b -> g -> ([a], g) Source

dropGen :: (Eq b, Num b) => (g -> (a, g)) -> b -> g -> g Source

dropIO :: IOGen g a -> Integer -> IO () Source