Returns a function that draws n independent samples from the
Poisson distribution.
# S3 method for class 'poisson_dist'
sampler(x, ...)A function function(n = 1, ...) returning an integer vector
of length n.
x <- poisson_dist(5)
s <- sampler(x)
set.seed(42)
s(5)
#> [1] 8 9 4 7 6