Falls back to MC: materializes x via ensure_realized() and
then applies rmap with g to the resulting empirical distribution.
# S3 method for class 'dist'
rmap(x, g, n = 10000L, ...)An empirical_dist of the transformed samples.
# \donttest{
set.seed(1)
x <- exponential(1)
# Distribution of log(X) where X ~ Exp(1)
log_x <- rmap(x, log)
mean(log_x)
#> [1] -0.5919414
# }