fn with_rng<R>(f: impl FnOnce(&mut Rng) -> R) -> R
Run an operation with the current thread-local generator.