Module random
SourceDescription
Random effect — entropy primitive.
Sub-effect of IO. Today this file declares +Random and exposes the random-gen-* host primitives that back it; the typed Random trait, .shuffle, .choice, and friends arrive later.
Abstractions
Effects
- Random
Entropy effect.
Functions
Functions
- random-gen-bool
Uniform 50/50
Bool.- random-gen-bytes
Fills a
Bytesof lengthnwith random data.- random-gen-f64
Draws a uniformly distributed
Floatin[0.0, 1.0)— matches the- random-gen-u64
Draws a uniformly random 64-bit unsigned value, pushed as an
Int.- random-gen-u8
Draws a uniformly random byte in
0..=255, pushed as anInt.