Std.Random
15 public declarations
- below
&Std.Random.Generator -> N -> (Std.Random.Generator, N) where N: IntegerA number below a bound, and the generator that follows.
- between
&Std.Random.Generator -> N -> N -> (Std.Random.Generator, N) where N: IntegerA number between two bounds, the lower included and the upper excluded.
- boolean
&Std.Random.Generator -> (Std.Random.Generator, Bool)A truth value, true about half the time.
- chance
&Std.Random.Generator -> Int -> (Std.Random.Generator, Bool)A truth value true with the given chance in a hundred.
- fromClock
Std.Random.GeneratorA generator started from the clock.
- fromSeed
UInt64 -> Std.Random.GeneratorA generator started from a seed.
- Generator
A generator's state: one number that carries everything it remembers.
- identifier
&Std.Random.Generator -> Int -> (Std.Random.Generator, Str)Text of lower-case letters and digits, for an identifier a person will read.
- next
&Std.Random.Generator -> (Std.Random.Generator, UInt64)The next state and the number it produced.
- numbers
&Std.Random.Generator -> Int -> N -> (Std.Random.Generator, Array[N]) where N: IntegerAn array of numbers below a bound.
- pick
&Std.Random.Generator -> &Array[T] -> (Std.Random.Generator, Option[T])One element of an array, or `None` when it is empty.
- sample
&Std.Random.Generator -> &Array[T] -> Int -> (Std.Random.Generator, Array[T])A number of elements drawn without replacement, in a shuffled order.
- secureBytes
Int -> Result[Bytes, Str]Cryptographically strong bytes from the operating system.
- shuffle
&Std.Random.Generator -> &Array[T] -> (Std.Random.Generator, Array[T])The elements in a shuffled order.
- text
&Std.Random.Generator -> Int -> Str -> (Std.Random.Generator, Str)Text of a given length drawn from an alphabet.
