This is a factory function that returns a function that acts like utils.sample, except it can sample multiple values as an array. Like utils.sample, the returned function can also sample by weighted values.
Parameters
n: number
How many values the returned sample function should retrieve, when it is called.
This is a factory function that returns a function that acts like
utils.sample, except it can sample multiple values as an array. Likeutils.sample, the returned function can also sample by weighted values.