Generates a function that provides lazy number generation from a random permutation of integers 1 to n without repetition. The numbers are generated using the Fisher-Yates algorithm and run length encoding (RLE) is used to keep memory use for the storage of used/available numbers minimal.
random_permutation(n)
Upper limit for random numbers (inclusive)
A function f(m)
that returns m
random numbers from the random
permutation of integers 1 to n without repetition,. If all available
numbers 1 to n have been returned but more are requested, the function throws
an error.