Make a random number generator repeatableSource:
Given a function that generates random data, returns a wrapped version of that function that always uses the same seed when called. The seed to use can be passed in explicitly if desired; otherwise, a random number is used.
The function that is affected by the R session's seed.
The seed to set every time the resulting function is called.
A repeatable version of the function that was passed in.
When called, the returned function attempts to preserve the R session's
current seed by snapshotting and restoring