with-system-random ( quot -- ) (original) (raw)

with-system-random ( quot -- )
Generating random integers

Prev: with-random ( rnd quot -- )
Next: with-secure-random ( quot -- )

Vocabulary
random

Inputs

quot a quotation

Outputs
None

Word description
Calls the quotation with the system's random number generator in a dynamic variable. All random numbers will be generated using this random number generator.

See also
with-random, with-secure-random

Definition

USING: kernel namespaces ;

IN: random

: with-system-random ( quot -- )
system-random-generator get swap with-random ; inline