Returns a function that draws n independent samples from the
uniform distribution.
# S3 method for class 'uniform_dist'
sampler(x, ...)A function function(n = 1, ...) returning a numeric vector
of length n.
x <- uniform_dist(0, 10)
s <- sampler(x)
set.seed(42)
s(5)
#> [1] 9.148060 9.370754 2.861395 8.304476 6.417455