with_random_source noise_type (symbol)
Resets the random number generator to the specified noise type for the specified code block. All generated random numbers and randomisation functions such as shuffle
and choose
within the code block will use this new generator. Once the code block has completed, the original generator is restored and the code block generator is discarded. Use this to change the sequence of random numbers in your piece in a way that can be reproduced. Especially useful if combined with iteration. See examples.
Introduced in v3.3
# Example 1 | |
|
|