lean4-htt/library/system
Leonardo de Moura ac13f8b0f9 feat(library/system/io): add random number generator support in the io monad
@aqjune @nunoplopes: See new tests at tests/lean/run/random.lean

We have two actions in `io`. By default, `io` uses the C++
random number generator, but we can force it to use a `std_gen` with
the action `set_rand_gen`.

def rand (lo : nat := std_range.1) (hi : nat := std_range.2) : io nat
def set_rand_gen : std_gen → io unit
2018-02-15 16:12:08 -08:00
..
io.lean feat(library/system/io): add random number generator support in the io monad 2018-02-15 16:12:08 -08:00
io_interface.lean feat(library/system/io): add random number generator support in the io monad 2018-02-15 16:12:08 -08:00
random.lean feat(library/system): basic support for random numbers 2018-02-15 14:36:28 -08:00