Math.Random
eff RandomSourceAn effect used to generate random numbers.
Operations
def randomFloat64(): Float64 \ Random
SourceReturns a pseudorandom 64-bit floating-point number in the range [0.0, 1.0].
def randomInt64(): Int64 \ Random
SourceReturns a pseudorandom 64-bit integer.
Definitions
def handle(f: a -> b \ ef): a -> b \ (ef - Random) + IO
SourceHandles the Random effect of the given function f.
In other words, re-interprets the Random effect using the IO effects.
def handleWithSeed(seed: Int64, f: a -> b \ ef): a -> b \ ef - Random
SourceRuns the Random effect of the given function f from an initial seed.
In other words, re-interprets the Random effect using seeded deterministic randomness.
@DefaultHandler def runWithIO(f: Unit -> a \ ef): a \ (ef - Random) + IO
SourceRuns the Random effect of the given function f.
In other words, re-interprets the Random effect using the IO effects.
def runWithSeed(seed: Int64, f: Unit -> a \ ef): a \ ef - Random
SourceRuns the Random effect of the given function f from an initial seed.
In other words, re-interprets the Random effect using seeded deterministic randomness.