replaced list comprehension with list constructor
replaced closure with class _rng

The use of class _rng helps with the implementation of tests, taking into account the underlying distribution.
The distribution parameters are stored in the class.
Docs updated